var centralManager: CBCentralManager!
@nonobjc func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
**if let centralManagerIdentifiers = launchOptions?[UIApplicationLaunchOptionsBluetoothCentralsKey]** {
NSLog("UIApplicationLaunchOptionsBluetoothCentralsKey = \(centralManagerIdentifiers)")
}
我在执行 CentralManagerIdentifiers 的可选绑定(bind)时遇到错误, 谁能帮我这个?
最佳答案
swift 3.0
试试这个。
if let centralManagerIdentifiers = launchOptions?[UIApplicationLaunchOptionsKey.bluetoothCentrals] {
NSLog("UIApplicationLaunchOptionsBluetoothCentralsKey = \(centralManagerIdentifiers)")
}
关于ios - Swift 中对成员下标错误的不明确引用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45646814/