【发布时间】:2013-03-26 19:10:44
【问题描述】:
我想检测 iOS 设备是否启用了蓝牙,以便防止 CoreBluetooth 库提示应用用户启用它。我不想检查 CBCentralManager 的状态;我只是想阻止蓝色弹出框,以免惹恼我的用户。
【问题讨论】:
标签: iphone ios core-bluetooth bluetooth-lowenergy
我想检测 iOS 设备是否启用了蓝牙,以便防止 CoreBluetooth 库提示应用用户启用它。我不想检查 CBCentralManager 的状态;我只是想阻止蓝色弹出框,以免惹恼我的用户。
【问题讨论】:
标签: iphone ios core-bluetooth bluetooth-lowenergy
如果没有对话框,您将无法在应用中使用 CoreBluetooth。所以如果你想一起阻止它,你不能。
如果您只是想阻止他们是否关闭了蓝牙,那么首先检查 CBCentralManager 的状态是正确的方法(即检查它是否 == CBCentralManagerStatePoweredOff)。
【讨论】: