[英]App rejected: Missing Info.plist key “NSBluetoothPeripheralUsageDescription” but framework is not present
I have a Cordova app that runs in iOS phones. 我有一个在iOS手机中运行的Cordova应用程序。 I'm trying to send an update of this app to App Store, but it is being rejected.
我正在尝试将此应用程序的更新发送到App Store,但它被拒绝了。 Firstly it was rejected because the
info.plist
contained a line with the key NSBluetoothPeripheralUsageDescription
and this feature is never used in my app. 首先它被拒绝了,因为
info.plist
包含一个带有密钥NSBluetoothPeripheralUsageDescription
的行,这个功能从未在我的应用程序中使用。 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: 为了解决这个问题,我从
info.plist
删除了这一行,并从CoreBluetooth.framework
Linked Frameworks和Libraries(框架CoreBluetooth.framework
和线路NSBluetoothPeripheralUsageDescription
由Cordova Diagnostic Plugin添加)中删除了相应的框架,如下图所示:
However now I'm receiving a e-mail from iTunes Connect saying this: 但是现在我收到来自iTunes Connect的电子邮件说:
Missing Info.plist key - This app attempts to access privacy-sensitive data without a usage description.
缺少Info.plist密钥 - 此应用程序尝试在没有使用说明的情况下访问隐私敏感数据。 The app's Info.plist must contain an NSBluetoothPeripheralUsageDescription key with a string value explaining to the user how the app uses this data.
应用程序的Info.plist必须包含一个NSBluetoothPeripheralUsageDescription键,其中包含一个字符串值,向用户解释应用程序如何使用此数据。
But I removed the CoreBluetooth.framework
from the xCode project... 但是我从
CoreBluetooth.framework
项目中删除了CoreBluetooth.framework
......
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" 打开Info Plist文件并按+符号在项目的info.plist中添加新密钥并添加此NSBluetoothPeripheralUsageDescription并写入值“解释蓝牙的原因”
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.
您应该发现为什么您的应用或其框架需要这些,并在您的应用的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) 暂时您可以在info.plist中添加以下说明并提交您的应用(如果有紧急应用更新)
<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. 只需打开您的info.plist并相应地添加上面的代码。
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. 尝试在下面添加你的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>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.