centralManagerDidUpdateState returns power off iOS 11-Beta 4

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-06 08:39:40

问题


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.

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.


回答1:


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

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

Also stated that:

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.

Also, advised to update and check with Beta 5.

Check the complete thread here for more info:

iOS 11 - CoreBluetooth Broken If Using State Presevation and Peripheral Not Cancelled Properly



来源:https://stackoverflow.com/questions/45583953/centralmanagerdidupdatestate-returns-power-off-ios-11-beta-4

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