您的位置:首页 > 产品设计 > UI/UE

Xcode8打包发布应用 NSPhotoLibraryUsageDescription

2016-10-11 10:38 316 查看
Xcode8 面世啦,升级以后要打包并上传未完的项目,
但是每次提交之后都是无效版本,这是什么情况呢。。。
登上QQ邮箱去看下有什么消息,果然苹果发来了邮件,
里面提到了

We have discovered one or more issues with your recent delivery for "xxxxx". To process your delivery, the following issues must be corrected:
Non-public API usage:
The app references non-public symbols in ComeToMe: _UICreateCGImageFromIOSurface.........
Missing Push Notification Entitlement - Your app includes an API for Apple's Push Notification service, but the aps-environment entitlement
is missing from the app's signature.......

什么意思呢,第一个是说app里面用私有API UICreateCGImageFromIOSurface了,
好嘛,想起来我app里面用了reveal ,删掉;
然后第二个问题说丢失了推送的“Entitlement”,这个是什么鬼呢,Xcode8有个新的改变,就是你在capabilities里面开通相应的功能时 bundle里面多出一个后缀为‘Entitlement’的文件,那么,怎么解决这个问题呢,在证书配置都正确的前提下,把有问题的功能关闭重新打开就行了。
好了问题解决了,打包上传。。。。
可是这次又是无效版本,我去,再去邮箱看看,额这回又来个邮件:

We have discovered one or more issues with your recent delivery for "xxxxxxxx". To process your delivery, the following issues must be corrected:
This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSPhotoLibraryUsageDescription
key with a string value explaining to the user how the app uses this data.

This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSBluetoothPeripheralUsageDescription
key with a string value explaining to the user how the app uses this data.

This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSMicrophoneUsageDescription
key with a string value explaining to the user how the app uses this data.

This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSCameraUsageDescription
key with a string value explaining to the user how the app uses this data.

Once these issues have been corrected, you can then redeliver the corrected binary.
什么意思呢,还记得,在Xcode7刚出世的一个改动嘛,就是必须在infoplist文件里面加几个属性,关于定位的NSLocationWhenInUseUsageDescription 和NSLocationAlwaysUsageDescription,这回也是这个意思,就是说你得在plist文件里面加上NSPhotoLibraryUsageDescription(相册),NSBluetoothPeripheralUsageDescription(蓝牙),NSMicrophoneUsageDescription(话筒),NSCameraUsageDescription(摄像头)的描述,具体value(字符窜)你写什么,就看你自己的了。
改完之后,打包上传,成功!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
相关文章推荐