【问题标题】:How to prevent the CoreBluetooth library from prompting to turn-on an iOS device's bluetooth?如何防止CoreBluetooth库提示打开iOS设备的蓝牙?
【发布时间】:2013-03-26 19:10:44
【问题描述】:

我想检测 iOS 设备是否启用了蓝牙,以便防止 CoreBluetooth 库提示应用用户启用它。我不想检查 CBCentralManager 的状态;我只是想阻止蓝色弹出框,以免惹恼我的用户。

【问题讨论】:

    标签: iphone ios core-bluetooth bluetooth-lowenergy


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 2013-05-01
      • 2014-09-04
      • 1970-01-01
      • 1970-01-01
      • 2023-03-23
      • 2013-12-15
      • 1970-01-01
      • 2013-01-11
      相关资源
      最近更新 更多