PermissionScope icon indicating copy to clipboard operation
PermissionScope copied to clipboard

Don't start/stop Bluetooth advertising if powered off

Open cgst opened this issue 9 years ago • 1 comments

Attempting to

bluetoothManager.startAdvertising(nil)
bluetoothManager.stopAdvertising()

in triggerBluetoothStatusUpdate() outputs an error message on the iOS system console:

[CoreBluetooth] API MISUSE: <CBPeripheralManager: 0x15f1fb1a0> can only accept this command while in the powered on state

cgst avatar Oct 14 '15 21:10 cgst

This is only called if the peripheral state is Unknown which is exclusive of knowing if the peripheral is on/off. I don't see a huge issue here other than the error message, so punting this until we refactor bluetooth to pending status in #113.

nickoneill avatar Dec 21 '15 20:12 nickoneill