info文件的小心得

iOS info.plist 配置文件

在iOS开发中 .plist文件其实是XML格式的文本文件。

这次遇到一个问题,老项目更新准备上架,在上架的时候被拒了,报

ITMS-90683: Missing purpose string in Info.plist - Your app’s code references one or more APIs that access sensitive user data, or the app has one or more entitlements that permit such access. The Info.plist file for the “XXX” bundle should contain a NSBluetoothPeripheralUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. If you’re using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required.

在老项目中因为可能改过名字的原因,.plist文件不会自动索引关键字,导致申请的蓝牙权限是手动输入的,Privacy - Bluetooth Peripheral Usage Description和Privacy - Bluetooth Always Usage Description不会替换成NSBluetoothPeripheralUsageDescription 和NSBluetoothAlwaysUsageDescription 于是上架的时候报没有申请权限。

解决办法 在其他项目中复制原始值过来:在对应的plist权限目录点击 raw keys and values 复制,粘贴。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容