我使用的是包含Pogo Connect SDK的SDK.当我添加SDK和构建时,我遇到了一些错误.然后我导入了AVFundation和CoreBluetooth库.在添加CoreBluetooth库之前,我收到以下错误:
Undefined symbols for architecture armv7: "_CBCentralManagerScanOptionAllowDuplicatesKey", referenced from: -[T1PogoPenConnectionManager startScan:] in SealSignBSSClientLibrary.a(T1PogoPenConnectionManager.o) "_CBCentralManagerOptionShowPowerAlertKey", referenced from: -[T1PogoPenConnectionManager initWithDelegate:sender:] in SealSignBSSClientLibrary.a(T1PogoPenConnectionManager.o) "_OBJC_CLASS_$_CBUUID", referenced from: objc-class-ref in SealSignBSSClientLibrary.a(T1PogoPenConnectionManager.o) objc-class-ref in SealSignBSSClientLibrary.a(T1Peripheral.o) "_CBConnectPeripheralOptionNotifyOnDisconnectionKey", referenced from: -[T1PogoPenConnectionManager connectT1Peripheral:] in SealSignBSSClientLibrary.a(T1PogoPenConnectionManager.o) "_OBJC_CLASS_$_CBCentralManager", referenced from: objc-class-ref in SealSignBSSClientLibrary.a(T1PogoPenConnectionManager.o) ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)
但添加此库后,我仍然会收到此错误:
Undefined symbols for architecture armv7: "_CBCentralManagerOptionShowPowerAlertKey", referenced from: -[T1PogoPenConnectionManager initWithDelegate:sender:] in SealSignBSSClientLibrary.a(T1PogoPenConnectionManager.o) ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)
我找了一个解决方案,但我发现这个"CBCentralManagerOptionShowPowerAlertKey"在CoreBluetooth库中.
有什么建议??
提前致谢!!
您得到的错误是因为您正在尝试为iOS 6编译您的项目,其中Core Bluetooth没有_CBCentralManagerOptionShowPowerAlertKey
枚举,而Pogo可能会使用它.您必须更改为iOS 7或将该依赖项转移到该SDK.