1

I would like to detect whether an iOS device has Bluetooth enabled so that I can prevent the CoreBluetooth library from prompting the app user to enable it. I am NOT looking to check the state of the CBCentralManager; I just want to prevent the blue popup box so that it doesn't annoy my users.

4

1 回答 1

0

如果没有对话框,您将无法在应用程序中使用 CoreBluetooth。所以,如果你想一起阻止它,你不能。

如果您只是想阻止他们是否关闭了蓝牙,那么首先检查 CBCentralManager 的状态是正确的方法(即检查它是否 == CBCentralManagerStatePoweredOff)。

于 2013-04-17T04:01:04.843 回答