Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NSBluetoothAlwaysUsageDescription required, but bluetooth is not used

In my ios app with new Xcode 11 GM Seed 2 after deploy, apple returned error: ITMS-90683: Missing Purpose String in Info.plist with NSBluetoothAlwaysUsageDescription.

https://developer.apple.com/documentation/bundleresources/information_property_list/nsbluetoothalwaysusagedescription?language=objc readed.

The problem is that I don't use bluetooth in my app. Or maybe I don't know about it. How can I find out why this permission purpose is needed?

I'm not using CoreBluetooth.framework

like image 857
Nik Kov Avatar asked Sep 18 '19 08:09

Nik Kov


People also ask

What is nsbluetoothalwaysusagedescription?

A message that tells the user why the app is requesting the ability to connect to Bluetooth peripherals. For apps with a deployment target of iOS 13 and later, use NSBluetoothAlwaysUsageDescription instead.

How do I deploy earlier versions of iOS with nsbluetoothalwaysusagedescription?

For deployment targets earlier than iOS 13, add both NSBluetoothAlwaysUsageDescription and NSBluetoothPeripheralUsageDescription to your app’s Information Property List file. Devices running earlier versions of iOS rely on NSBluetoothPeripheralUsageDescription, while devices running later versions rely on NSBluetoothAlwaysUsageDescription.

What is the nsbluetoothperipheralusagedescription key?

A message that tells the user why the app needs access to Bluetooth. This key is required if your app uses the device’s Bluetooth interface. If your app has a deployment target earlier than iOS 13, add the NSBluetoothPeripheralUsageDescription key to your app’s Information Property List file in addition to this key.

Why do I need a Bluetooth key?

This key is required if your app uses APIs that access Bluetooth peripherals and has a deployment target earlier than iOS 13. A message that tells the user why the app needs access to Bluetooth.


2 Answers

I had this exact same issue today. When I did a grep search I found that there is some reference to CoreBluetooth.framework inside my project.pbxproj

I removed the reference and building the app went fine. Uploaded to Apple and it got through so this worked for me.

To search use the following command

grep -r -a CoreBluetooth.framework ProjectFolder
like image 134
Maurice Avatar answered Sep 28 '22 04:09

Maurice


Open your Info.plist and add a NSBluetoothAlwaysUsageDescription. You can do this in the editor by adding a line item like this:

Screenshot of info.plist with NSBluetoothAlwaysUsadeDescription as the key and explanation text as the String value

Or you can right click on the Info.plist and Open As -> Source Code and paste in the two appropriate lines as xml:

<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
    ....
    <key>NSBluetoothPeripheralUsageDescription</key>
    <string>We use Bluetooth to connect to the MantisX hardware device.</string>
    ....
</dict>
</plist>
like image 40
Chase Roberts Avatar answered Sep 28 '22 03:09

Chase Roberts