-->

App store connect reject build because missing NSB

2020-08-23 03:59发布

问题:

I use Xcode 10.3 to distribute my app. Then App store connect always reject the build. And I got an email said "The app's info.plist file should contain a NSBluetoothAlwaysUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data." I added the key "Privacy - Bluetooth Always Usage Description". But got the rejection yet. There was "Privacy - Bluetooth Peripheral Usage Description” already and it was ok since today. So how to resolve this?

回答1:

You'll need to add the purpose : Why your app requires Bluetooth to be enabled. Something like this :

<key>NSBluetoothAlwaysUsageDescription</key>
<string>App uses Bluetooth to find, connect and communicate with nearby devices. Please grant access.</string>


回答2:

Just putting a purpose without knowing what is using it would not be the best way to handle this.

I had this exact same issue. 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


回答3:

The accepted answer is right but not full. You really need to add this key into your .plist file. But NSBluetoothAlwaysUsageDescription added in iOS 13+. If you target iOS below 13, you also need to add NSBluetoothPeripheralUsageDescription in addition to first key.



回答4:

Open your info.plist as source code and add below line

<key>NSBluetoothPeripheralUsageDescription</key>
    <string>$(PRODUCT_NAME) needs bluetooth access to connect via bluetooth.</string>

//remember need bluetooth access to connect via bluetooth is just an arbitrary message. You should change it according to your needs.


回答5:

Steps: click on info.plist > open as source code > add the follow

NSBluetoothPeripheralUsageDescription We use Bluetooth to connect to the MantisX hardware device.