Lou*_*257 16 objective-c ios core-bluetooth
在我完成与蓝牙设备的断开连接后,看到他们已经在didDisconnectPeripheral委托中断开连接,我试图解除我的viewcontroller.
当发生这种情况时,我看到消息:"[CoreBlueooth] XPC连接无效"
是否有特定的东西必须在视频控制器被解除之前用蓝牙清理?
我放置CBCentralManager一个单身,错误信息解决了.
(CBCentralManager不会被解除分配)
我收到以下消息:
[CoreBlueooth] XPC连接无效
而且我无法使用以下非常简单的实现来扫描BLE设备:
NSObject<CBCentralManagerDelegate, CBPeripheralDelegate>
Run Code Online (Sandbox Code Playgroud)
我的解决方案是在我Info.plist的隐私 - 蓝牙外设使用说明中 添加一个值,NSBluetoothPeripheralUsageDescription描述我对蓝牙外设的处理方式.
看起来像这样info.plist:
<key>NSBluetoothPeripheralUsageDescription</key>
<string>Play with BLE Compatible devices<string>
Run Code Online (Sandbox Code Playgroud)
在这里写一些更准确的东西 ;)
| 归档时间: |
|
| 查看次数: |
10985 次 |
| 最近记录: |