所以我有 info.plist :
<key>NSBluetoothPeripheralUsageDescription</key>
<string>Bluetooth is required bla bla.</string>
我什至将其本地化为两种支持的语言。
然后添加InfoPlist.strings文件并添加:
"NSBluetoothPeripheralUsageDescription" = "Bluetooth is required bla bla bla";
并将其本地化......
在应用程序目标的功能中,我为后台模式添加了蓝牙。
我只使用标准的 BLE api,没有外部库。
为什么我总是收到一封电子邮件:
Dear Developer,
We identified one or more issues with a recent delivery for your app, "bla". Please correct the following issues, then upload again.
Missing Purpose String in Info.plist File - Your app's code references one or more APIs that access sensitive user data. The app's Info.plist file should contain a NSBluetoothPeripheralUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data.
?
最佳答案
您应该添加更多说明,说明为什么您将蓝牙用于 key NSBluetoothPeripheralUsageDescription。
应用程序提供商必须分享您使用特定服务的具体原因。
<key>NSBluetoothPeripheralUsageDescription</key>
<string>Bluetooth is used to communicate with BLE devices.</string>
此外,您需要检查哪个是与您的项目设置关联的 .plist 文件。
您可以使用 Info.plist 文件部分的目标设置检查它。
选择Target -> Build Settings -> Packaging -> Info.plist file
关于ios - 为什么 NSBluetoothPeripheralUsageDescription key 的应用程序被 "Missing Purpose String in Info.plist File"拒绝?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53428339/