Is there any way to pop-up the dialog of bluetooth authorization other than launching first time?

I would like to my App popup the dialog of Bluetooth authorization other than launching my App at first time.

I could find the status of users whether they pressed allow or not from apple doc.

https://developer.apple.com/documentation/corebluetooth/cbmanagerauthorization?language=objc

But I could not find the way to show the same dialog App launched at first time from info.plist. Is there any way to show the dialog of bluetooth again?

Replies

You should be able to ask explicitely for authorization:

https://stackoverflow.com/questions/52281137/ios-how-to-explicitly-request-permission-for-bluetooth-background-operation-mode


Normally, request is made by system the first time you need Bluetooth.


All func to get status info are now deprecated, notably. Looks like the trend is to let system only be able to manage it (for security reason certainly).

class func authorizationStatus() -> CBPeripheralManagerAuthorizationStatus

idem for CBPeripheralManagerAuthorizationStatus


I've searched doc rapidly. Maybe this could be now used:

optional func centralManager(_ central: CBCentralManager, didUpdateANCSAuthorizationFor peripheral: CBPeripheral)