ios - CoreBluetooth XPC 连接在关闭 View Controller 时无效

标签 ios objective-c core-bluetooth

在我完成与蓝牙设备的断开连接后,在 didDisconnectPeripheral 委托(delegate)中看到它们已断开连接,我试图关闭我的 View Controller 。

发生这种情况时,我会看到消息:“[CoreBlueooth] XPC 连接无效”

在 viewcontroller 被关闭之前,是否有一些特定的东西必须用蓝牙清理?

最佳答案

我把 CBCentralManager 放到一个单例中,错误信息就解决了。

(CBCentralManager 不会被释放)

关于ios - CoreBluetooth XPC 连接在关闭 View Controller 时无效,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43880346/

相关文章:

ios - 在 UIView 中包含 UIViewController

ios - Realm :通过选择列表属性获取对象

ios - Swift Heart Rate Variability 结果从 ms 到 double 的转换

objective-c - 相同的函数,都被执行,一个声音都没有

ios - 在初始化程序中设置父类(super class)中定义的属性

ios - 核心蓝牙 : testing state preservation and restoration

ios - 如果在 iPhone 的蓝牙设置中建立连接,我如何收到通知?

ios - 应用程序无法访问您的照片或视频 iOS 9

ios - CoreBluetooth - centralManagers 方法 didDiscoverPeripheral 在 sleep 模式下变得最不频繁到没有

php - iPhone Objective C 图片上传到apache服务器