【发布时间】:2019-08-08 07:35:03
【问题描述】:
这个问题可能会重复,但我尝试了很多代码,但没有成功。我读过关于
CBCentralManagerOptionShowPowerAlertKey
选项以及在 iPhone 中显示设置蓝牙选项以打开应用程序的警报的可能性,但我还没有得到这个功能。
如果我将键设置为 true,则键不会出现,而当我将值更改为 false 时,键不起作用...
我在我的 Swift 应用程序中使用了这段代码:
var bCentralManger: CBCentralManager!
self.bCentralManger = CBCentralManager(delegate: self, queue: DispatchQueue.main, options: [CBCentralManagerOptionShowPowerAlertKey: true])
在 iOS 中可以使用此选项吗?我在我的设备上使用 iOS 12。有人用这个代码吗? 谢谢!
【问题讨论】:
标签: ios swift bluetooth cbcentralmanager uialertviewdelegate