Using requestBluetoothAuthorizattion when state is unauthorized throws a native API misuse error on iOS #477
Labels
bug
Something isn't working properly
ios
relates to iOS platform
runtime issue
An issue related to app runtime
Bug report
CHECKLIST
Current behavior:
When you click on "Request Bluetooth Authorization" when the bluetooth state shows "UNAUTHORIZED", you are not asked to authorize anymore and in the native logs, it fails with a native error API MISUSE telling that the CBCentralManager needs to be in powered_on state (look for MISUSE in the native logs trail pasted below).
I have used the example code of the cordova-diagnostic-plugin and was able to reliably reproduce the issue.
Expected behavior:
To my understanding, using
diagnostic.requestBluetoothAuthorization
should ask again for authorization specifically in the case where the bluetooth state isUNAUTHORIZED
to change it toAUTHORIZED
Steps to reproduce:
UNAUTHORIZED
, Bluetooth authorization status should beDENIED_ALWAYS
Screenshots
Environment information
Runtime issue
iOS build issue:
Related code:
Console output
console output
Other information:
The text was updated successfully, but these errors were encountered: