1
var centralManager: CBCentralManager!
@nonobjc func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
**if let centralManagerIdentifiers = launchOptions?[UIApplicationLaunchOptionsBluetoothCentralsKey]** {
NSLog("UIApplicationLaunchOptionsBluetoothCentralsKey = \(centralManagerIdentifiers)")
}
我得到一个错误,我做CentralManagerIdentifiers的可选结合, 谁能帮助我?暧昧参考成员标误差在斯威夫特
您正在使用哪个版本的swift? – Jaydeep
它是'launchOptions?[。bluetoothCentrals]' – Lamar
您的方法头以Swift 2的形式编写。不要用'@ nonobjc'隐藏警告。您需要修复Swift 3(或4?)的方法头,并且可能还有其他一些东西。 – OOPer