0
我試圖在後臺掃描BLE設備,但我的didDiscoverPeripheral方法沒有被調用。我一直在等待5分鐘,什麼都沒有發生,但是當我打開其他藍牙應用程序如「LightBlue」時,我的didDiscoverPeripheral會立即被調用。這每次都會發生。我如何在不運行LightBlue的情況下完成這項工作?CoreBluetooth - didDiscoverPeripheral在背景模式下沒有調用沒有LightBlue
這裏是我的掃描代碼: central.scanForPeripherals(withServices: [cbuuid], options: nil)
項目具有正確的背景設置,因爲didDiscoverPeripheral推出LightBlue後的工作背景。