我是靠谱客的博主 忧伤啤酒,这篇文章主要介绍[CoreBluetooth] API MISUSE: can only accept this command while in the powered on state(iOS蓝牙),现在分享给大家,希望可以做个参考。
1.centralManagerDidUpdateState代理方法还没有第一次被调用,就执行scanForPeripheralsWithServices方法,CBCentralManager还不知道你的蓝牙是否可用,所以无法扫描
2.在蓝牙关闭的情况下调用scanForPeripheralsWithServices方法

在创建CBPeripheralManager的时候也可能遇到同样的问题,可以参考下面的博客:
API MISUSE: <CBPeripheralManager: 0x282c00070> can only accept this command while in the powered on
最后
以上就是忧伤啤酒最近收集整理的关于[CoreBluetooth] API MISUSE: can only accept this command while in the powered on state(iOS蓝牙)的全部内容,更多相关[CoreBluetooth]内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复