PermissionScope
PermissionScope copied to clipboard
Don't start/stop Bluetooth advertising if powered off
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
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.