centralManagerDidUpdateState返回iOS 11-Beta 4的电源 [英] centralManagerDidUpdateState returns power off iOS 11-Beta 4

查看:161
本文介绍了centralManagerDidUpdateState返回iOS 11-Beta 4的电源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 CoreBluetooth ,而我正在使用 CBCentralManager 及其代理人。但问题是,当我在 iOS 11-Beta 4 中运行我的代码时,我在委托中获得断电状态 - (void)centralManagerDidUpdateState:(CBCentralManager *)蓝牙开启时中央

I'm working with CoreBluetooth and I'm using CBCentralManager and its delegates. But the problem is that when I run my code in iOS 11-Beta 4 I get power off state in delegate - (void)centralManagerDidUpdateState:(CBCentralManager *)central while bluetooth is ON.

当我关闭蓝牙然后将其重新打开时,它会重新打开电源。此外,它在iOS 10和9中运行良好。外设工作正常,并且可以在iOS 11-Beta 4中使用LightBlue应用程序发现它。我不确定它为什么会发生。

When I turn bluetooth off and then turn it back to on, it returns power on. Also it is working fine in iOS 10 and 9. The peripheral is working fine too and it is discoverable using LightBlue application in iOS 11-Beta 4. I'm not sure why it's happening.

推荐答案

看起来像那里的bug,请查看错误报告:

It looks like bug there, check the bug report here:

https://bugreport.apple.com/web/?problemID=33728133

还声明:


对于不是$ b的应用,iOS 11通常不会那么宽容$ b保持对CB对象的适当引用,即使这里描述的问题
变得不那么严重。因此,最好是正确管理对象生命周期

iOS 11 is in general going to be less forgiving for apps which don't hold a proper reference to CB objects even if the problem described here becomes less severe. So, the best is to manage object life cycles properly.

此外,建议更新并检查Beta 5。

Also, advised to update and check with Beta 5.

查看完整的主题以获取更多信息:

Check the complete thread here for more info:

iOS 11 - 如果使用状态预存和外围设备未正确取消,则CoreBluetooth损坏

这篇关于centralManagerDidUpdateState返回iOS 11-Beta 4的电源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆