iOS开发:突发!上架遇到NSBluetoothAlwaysUsageDescription被拒问题(已解决)

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接: https://blog.csdn.net/CC1991_/article/details/101025139

最近两天,苹果更新了新设备,也更新了新系统,包括Xcode也更新了,每年苹果发布新品和新系统都会引起一些变化,对于iOS开发者来说,一般都会遇到没有遇到的坑,今年也不例外,前天在打包上架一个常规版本的时候,被意外的拒了,原因就是如下邮件内容:

We identified one or more issues with a recent delivery for your app, Please correct the following issues, then upload again.

ITMS-90683:Missing Purpose String in Info.plist- Your app’s code references one or more APIs that access sensitive user data. The app’s Info.plist file should contain a NSBluetoothAlwaysUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data.Starting Spring 2019, all apps submitted to the App Store that access user data are required to include a purpose string. 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.You can contact the developer of the library or SDK and request they release a version of their code that doesn’t contain the APIs

邮件图示:

翻译如下:

刚开始看到这个被拒理由觉得无厘头,因为蓝牙的这个权限之前一直都没有问题,而且这个提示的“NSBluetoothAlwaysUsageDescription”之前没遇到过,如图所示:

在plist文件里面输入开头字母也没有提示,以为还是蓝牙描述的问题,结果修改了蓝牙描述文字,提交版本,依然被拒,而且再提交几次,版本直接被苹果后台删了,找不到了,如图所示:

 

然后就直接去官方API里面找最新消息,结果找到原因了,iOS13废弃了之前的蓝牙的权限,新加NSBluetoothAlwaysUsageDescription权限,官方API提示如下:

 

然后就根据这个提示,又在plist文件里面添加了这个键值对,如下图所示:

 

最后重新编译,解决问题,如下所示:

虽然这只是一个新遇到的问题,但是刚开始大家遇到的都会不知所措,就分享出来给大家了。

 

以上就是本章全部内容,欢迎关注三掌柜的微信公众号“iOS开发by三掌柜”,三掌柜的新浪微博“三掌柜666”,欢迎关注!

三掌柜的微信公众号:

三掌柜的新浪微博:

 

猜你喜欢

转载自blog.csdn.net/CC1991_/article/details/101025139