7

I have a Cordova app that runs in iOS phones. I'm trying to send an update of this app to App Store, but it is being rejected. Firstly it was rejected because the info.plist contained a line with the key NSBluetoothPeripheralUsageDescription and this feature is never used in my app. To solve this problem I removed this line from info.plist and the respective framework from Linked Frameworks and Libraries in xCode (the framework CoreBluetooth.framework and the line NSBluetoothPeripheralUsageDescription was added by Cordova Diagnostic Plugin), as can be seen in the image below: Linked Frameworks and Libraries

However now I'm receiving a e-mail from iTunes Connect saying this:

Missing Info.plist key - This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSBluetoothPeripheralUsageDescription key with a string value explaining to the user how the app uses this data.

But I removed the CoreBluetooth.framework from the xCode project...

My question is: I need to remove this framework from another place? Are some other framework able to use bluetooth causing this problem?

Thanks for help.

Bruno Peres
  • 15,845
  • 5
  • 53
  • 89
  • yes, the framework may be present but the `NSBluetoothPeripheralUsageDescription` is not. – holex May 16 '17 at 14:21
  • Just add the description and you should be good. – LinusGeffarth May 16 '17 at 14:44
  • maybe any other third party frameworks is using it. If you are using cocoapods you can check the pod specs for you pods to see if core bluetooth is required or not. – Bilal May 16 '17 at 14:47
  • @Bilal no, I am not using Cocoa Pods. This is a Cordova project. You know if there are a simple way to discover if a third party framework is using bluetooth? Or maybe if some Cordova plugin is adding some framework that can require bluetooth? Thanks. – Bruno Peres May 16 '17 at 14:53
  • I don't know any other way..... These is a Cordova plugin uses bluetooth *Cordova Bluetooth LE Plugin* just make sure you are not using it. – Bilal May 16 '17 at 15:09
  • Did you remove both lines `NSBluetoothPeripheralUsageDescription` key and `This app requires bluetooth access to function properly.`? Can you remove the whole plugin causing this? it might be adding the key back – jcesarmobile May 17 '17 at 09:29

5 Answers5

8

Open Info Plist file and press on + sign add new key in info.plist of your project and add this NSBluetoothPeripheralUsageDescription and write value "Explain the reasons for bluetooth"

Check Screen shot below enter image description here

Jignesh Mayani
  • 6,937
  • 1
  • 20
  • 36
  • 1
    Thanks for your answer, but what I need is to remove the `CoreBluetooth.framework` or any other framework that can request bluetooth usage because my app don't use it. – Bruno Peres May 16 '17 at 14:40
  • Have you remove bluetooth code from your source code ? – Jignesh Mayani May 16 '17 at 14:53
  • No, I just removed the `CoreBluetooth.framework` from Linked Frameworks and Libraries and the respective line from `info.plist`. – Bruno Peres May 16 '17 at 14:54
7

It appears that you cannot have a generic text string like:

We need access to your bluetooth connection.

I had something like this and got rejected. When I had a more detailed description like:

We need access to your bluetooth connection to upload data from your device for crash reports.

I was approved.

D. Rothschild
  • 659
  • 9
  • 14
2

The descriptions are mandatory for any content you or any frameworks you link against attempt to access. The errors are generated upon an attempt to access the content if a usage description was not supplied, so if you're getting those errors your app must be requesting them. You should discover why your app or its frameworks require these and add appropriate usage descriptions to your app's info.plist.

Or more ideally, if you don't need access, see if there's a way to not request it (or use frameworks that do unnecessarily).

For time being you can add the following descriptions in your info.plist and submit your app (in case of urgent app update)

<key>NSCalendarsUsageDescription</key>
    <string>Explain the reasons for accessing...</string>
    <key>NSPhotoLibraryUsageDescription</key>
    <string>Explain the reasons for accessing...</string>
    <key>NSBluetoothPeripheralUsageDescription</key>
    <string>Explain the reasons for accessing...</string>

Just open your info.plist and add the code above accordingly.

enter image description here

0

Try to add below in your plist. It solve my problem.

<config-file parent="NSPhotoLibraryUsageDescription" platform="ios" target="*-Info.plist">
        <string>YourAppName would like to store a photo.</string>
    </config-file>
Zgpeace
  • 3,927
  • 33
  • 31
0

I found this thread because I had the same problem.

My experience was that I had installed a Bluetooth package with cordova, but, the experiment fail, and with the new copiles has this issue.

I checked the package.json, the package-lock.json and that I removed all the refences to my code. But, still falling.

Then I checked the pods bundle and found the Bluetooth bundle, but still failing.

I remove and add the platform ios and still falling.

Then I check the project and in the plugins folder I have the Bluetooth plugins folder. Removed, Compiled and works again.

I hope to help you.

gabrielrincon
  • 796
  • 5
  • 15