I've set the value NSBluetoothPeripheralUsageDescription in my .plist file to add a customized message to the bluetooth enabled alert message. But its not being used, I just see the standard 'Turn on bluetooth to allow...' However the NSLocationUsageDescription is being used on the location services alert message. Any suggestions? Thanks.
Asked
Active
Viewed 1.0k times
3
-
Are being prompted to turn on bluetooth when bluetooth is off or prompted to allow the app to access bluetooth? – Paulw11 Aug 27 '14 at 20:30
-
turn on bluetooth when bluetooth is off. 'Turn on Bluetooth to Allow "app-name" to Connect to Accessories' – Jiebe Sep 02 '14 at 17:46
-
1It seems like the answer has not been provided here, still. And I'm running into this as well. The real question is how can you force the system to display the message in the `NSBluetoothPeripheralUsageDescription` key? I would expect it to happen as soon as you look at the CBCentralManager's state property, but I have never seen this popup, still. – prolfe Oct 24 '16 at 19:20
1 Answers
4
The value for this key is used for a different permission, not just having bluetooth off.
If your app requests the bluetooth-peripheral
background mode, the system will ask the user for permission. The default message displayed to the user is:
[App Name] would like to make data available to nearby bluetooth devices even when you're not using the app.
The NSBluetoothPeripheralUsageDescription
key allows you to customize the above request for permission.
Check out the "Supporting User Privacy" section in the App Programming Guide for iOS for a bit more info.

Brad
- 181
- 3
- 13