我已连接BLE周与APP在后台运行的运行的多个应用程序。连接BLE外围单iPhone
在另一个应用程序我叫retrieveConnectedPeripherals(withServices:)
检索连接的外围设备的列表。
然后我打电话connect(\_:options:)
如documentation的“讨论”部分中所述,但从未调用centralManager(\_:didConnect:)
。
我保留CBPeripheral对象。
我已连接BLE周与APP在后台运行的运行的多个应用程序。连接BLE外围单iPhone
在另一个应用程序我叫retrieveConnectedPeripherals(withServices:)
检索连接的外围设备的列表。
然后我打电话connect(\_:options:)
如documentation的“讨论”部分中所述,但从未调用centralManager(\_:didConnect:)
。
我保留CBPeripheral对象。
按照讨论从两个链接https://developer.apple.com/documentation/corebluetooth/cbcentralmanager/1518924-retrieveconnectedperipherals和https://developer.apple.com/documentation/corebluetooth/cbcentralmanager/1518766-connect。 “centralManager(:didFailToConnect:错误:)” 被称为代替 “centralManager(:didConnect :)” 如果BLE外围是已经连接其他App。