写点什么

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

用户头像
三掌柜
关注
发布于: 3 小时前

最近两天,苹果更新了新设备,也更新了新系统,包括 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 文件里面添加了这个键值对,如下图所示:


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



最后

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

 

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

发布于: 3 小时前阅读数: 4
用户头像

三掌柜

关注

某某某技术有限责任公司架构师 2021.02.05 加入

一分耕耘,不一定有一分收获,但十分耕耘,一定会有一分收获!

评论 (1 条评论)

发布
用户头像
8月日更第七天
3 小时前
回复
没有更多了
iOS开发:上架遇到NSBluetoothAlwaysUsageDescription被拒问题(已解决)