CoreBluetooth XPC连接在关闭视图控制器时无效 [英] CoreBluetooth XPC Connection Invalid on dismiss viewcontroller
本文介绍了CoreBluetooth XPC连接在关闭视图控制器时无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我完成与蓝牙设备的断开连接后,看到它们已在didDisconnectPeripheral委托中断开连接,我尝试关闭我的视图控制器。
After I have finished disconnecting from my bluetooth devices, seeing that they have disconnected in the didDisconnectPeripheral delegate, I attempt to dismiss my viewcontroller.
这种情况发生时,我看到消息: [[CoreBlueooth] XPC连接无效
When this happens I see the message: "[CoreBlueooth] XPC Connection Invalid"
在关闭视图控制器之前,是否需要使用蓝牙清除某些特定内容?
Is there something in specific that has to be cleaned up with Bluetooth before the viewcontroller is dismissed?
推荐答案
我将 CBCentralManager
放到一个单例中,错误消息已解决。
I placed CBCentralManager
to a singleton and the error message is solved.
(不会取消分配CBCentralManager )
(CBCentralManager
will not be deallocated)
这篇关于CoreBluetooth XPC连接在关闭视图控制器时无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文