iPad Air - CoreBluetooth[ERROR] Cancelling picker as we couldn't communicate with Bluetooth

做~自己de王妃 提交于 2019-12-08 00:57:33

问题


I'm working with the "ExternalAccessory framework". I encountered a problem trying my app on a new iPad Air.

When i try to show the bluetooth picker this error appear:

CoreBluetooth[ERROR] Cancelling picker as we couldn't communicate with Bluetooth

The bluetooth is ON. Picker return this error:

Error Domain=EABluetoothAccessoryPickerErrorDomain Code=3 "The operation couldn’t be 
completed.

My app work on every Apple Device, except the new iPad Air.

EDIT

I can connect and communicate with my device. The problem appear only if i call the bluetooth picker.

EDIT 2

the problem appears also with a modified version of EADemo.

I've added this function.

- (void)searchDevice {
    [[EAAccessoryManager sharedAccessoryManager] showBluetoothAccessoryPickerWithNameFilter:nil completion:nil];
}

When i call it, BANG! The same error. Only in iPad Air

this problem will occur on all 64-bit devices


回答1:


Your app needs to include a 64-bit slice (add arm64 to the ARCHS build setting), otherwise this problem will occur on 64-bit devices like iPhone 5S, iPad Air... This is a bug in iOS 7.0 - 7.0.3. It is supposed to be fixed in the next release.




回答2:


Adding both:

#import <CoreBluetooth/CoreBluetooth.h>
#import <ExternalAccessory/ExternalAccessory.h>

To either the header of implementation fixed this for me.
Very strange because the frameworks are already linked at app launch?..



来源:https://stackoverflow.com/questions/20402973/ipad-air-corebluetootherror-cancelling-picker-as-we-couldnt-communicate-wit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!