简体   繁体   中英

App rejected: Missing Info.plist key “NSBluetoothPeripheralUsageDescription” but framework is not present

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: 链接的框架和库

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.

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 在此输入图像描述

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.

在此输入图像描述

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.

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>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM