我正在尝试使用此代码从api运行方法
GTMagBarDevice.sharedDevice().startScan();
但我收到错误
'GTMagBarDevice'没有名为'startScan'的成员
以下是我正在桥接的.h文件中的一些代码
@class GTMagBarDevice;
@protocol GTMagBarDeviceDelegate <NSObject>
@required
- (void)magbarDevice:(GTMagBarDevice*)device accessoryConnected:(BOOL)state;
- (void)magbarDevice:(GTMagBarDevice*)device componentFailed:(int)components;
@optional
// bEnabled means charging the iDevice is enabled
// bCharging means the MagBarDevice is currently charging itself
- (void)magbarDevice:(GTMagBarDevice*)device receivedBatteryStatus:(BOOL)bEnabled charging:(BOOL)bCharging voltage:(NSInteger)volts;
- (void)magbarDevice:(GTMagBarDevice*)device receivedBarcodeData:(NSString*)data barcodeType:(NSInteger)barcodeType;
- (void)magbarDevice:(GTMagBarDevice*)device scanDidTimeout:(BOOL)bAlwaysYes;
- (void)magbarDevice:(GTMagBarDevice*)device scanStarted:(BOOL)bStarted;
- (void)magbarDevice:(GTMagBarDevice*)device cardReaderReady:(BOOL)bReady;
- (void)magbarDevice:(GTMagBarDevice*)device swipeStarted:(BOOL)bAlwaysYes;
- (void)magbarDevice:(GTMagBarDevice*)device receivedMagneticStripeData:(NSDictionary*)data;
- (void)magbarDevice:(GTMagBarDevice*)device receivedBadStripeData:(BOOL)bAlwaysYes;
- (void)magbarDevice:(GTMagBarDevice*)device ignoredSwipe:(BOOL)bAlwaysYes;
- (void)magbarDevice:(GTMagBarDevice*)device firmwareUpdateAvailable:(NSString*)newVersion fromVersion:(NSString*)currentVersion;
- (void)magbarDevice:(GTMagBarDevice*)device physicalButtonPressed:(BOOL)bAlwaysYes;
- (void)magbarDevice:(GTMagBarDevice*)device physicalButtonReleased:(BOOL)bAlwaysYes;
@end
@interface GTMagBarDevice : NSObject {
BOOL accessoryAttached;
id<GTMagBarDeviceDelegate> delegate;
}
+ (GTMagBarDevice *)sharedDevice;
- (void)startScan;
@property (nonatomic, readonly) BOOL accessoryAttached;
@property (nonatomic, assign) id<GTMagBarDeviceDelegate> delegate;
@end