NSBluetoothPeripheralUsageDescription isn't being used

Jiebe picture Jiebe · Aug 27, 2014 · Viewed 10.3k times · Source

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.

Answer

Brad picture Brad · Aug 11, 2015

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.