Press "Enter" to skip to content

Xcode8上传app失败之iOS10权限描述缺失解决

半年多没有更新公司app了,昨天更新发生的问题,及Missing Info.plist key的解决方法!

问题1

重新编译后使用Xcode8上传一直卡住不动!

这个问题一直是诟病,跟苹果服务器有关部门都有关。

推荐更换“ApplicationLoader”3.0官方下载地址至于使用随手百度即可!

问题2

上传成功后,在构建版本中不显示!在导航-活动中也不出现!

几番搜索后得到提示:去邮箱查看,而且是主邮箱,由于我自己的是开发者组内的,没有邮件提示!

邮箱内容如下:

Dear developer,

We have discovered one or more issues with your recent delivery for "xxxx". To process your delivery, the following issues must be corrected:

Missing Info.plist key - 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.

Once these issues have been corrected, you can then redeliver the corrected binary.

Regards,

The App Store team

解决

原来在iOS10后,苹果对用户增加了隐私提醒!比如你app需要定位,苹果会提示app需要用户定位信息。

由于我们app用到了相机,所以在info.plist添加:

<key>NSCameraUsageDescription</key>
<string>$(PRODUCT_NAME) uses photos</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>$(PRODUCT_NAME) uses photos</string>

然后再次上传就OK了!

至于info.plist在stack overflow上有相应问题!参见地址:http://stackoverflow.com/questions/38498275/ios-10-changes-in-asking-permissions-of-camera-microphone-and-photo-library-c

鉴于网络较慢这里贴下帖子相应的权限描述,可以根据自己实际需求添加:

<key>NSCameraUsageDescription</key>
    <string>${PRODUCT_NAME} Camera Usage</string>

    <key>NSBluetoothPeripheralUsageDescription</key>
    <string>${PRODUCT_NAME} BluetoothPeripheral</string>

    <key>NSCalendarsUsageDescription</key>
    <string>${PRODUCT_NAME} Calendar Usage</string>

    <key>NSContactsUsageDescription</key>
    <string>${PRODUCT_NAME} Contact fetch</string>

    <key>NSHealthShareUsageDescription</key>
    <string>${PRODUCT_NAME} Helth Description</string>

    <key>NSHealthUpdateUsageDescription</key>
    <string>${PRODUCT_NAME} Helth Updates</string>

    <key>NSHomeKitUsageDescription</key>
    <string>${PRODUCT_NAME} HomeKit Usage</string>

    <key>NSLocationAlwaysUsageDescription</key>
    <string>${PRODUCT_NAME} Always Location get</string>

    <key>NSLocationUsageDescription</key>
    <string>${PRODUCT_NAME} Location Updates</string>

    <key>NSLocationWhenInUseUsageDescription</key>
    <string>${PRODUCT_NAME} WhenInUse Location</string>

    <key>NSAppleMusicUsageDescription</key>
    <string>${PRODUCT_NAME} Music Usage</string>

    <key>NSMicrophoneUsageDescription</key>
    <string>${PRODUCT_NAME} Microphone Usage</string>

    <key>NSMotionUsageDescription</key>
    <string>${PRODUCT_NAME} Motion Usage</string>

    <key>kTCCServiceMediaLibrary</key>
    <string>${PRODUCT_NAME} MediaLibrary Usage</string>

    <key>NSPhotoLibraryUsageDescription</key>
    <string>${PRODUCT_NAME} PhotoLibrary Usage</string>

    <key>NSRemindersUsageDescription</key>
    <string>${PRODUCT_NAME} Reminder Usage</string>

    <key>NSSiriUsageDescription</key>
    <string>${PRODUCT_NAME} Siri Usage</string>

    <key>NSSpeechRecognitionUsageDescription</key>
    <string>${PRODUCT_NAME} Speech Recognition Usage</string>

    <key>NSVideoSubscriberAccountUsageDescription</key>
    <string>${PRODUCT_NAME} Video Subscribe Usage</string>
打赏 赞(0)
微信
支付宝
微信二维码图片

微信扫描二维码打赏

支付宝二维码图片

支付宝扫描二维码打赏

Be First to Comment

发表评论

电子邮件地址不会被公开。 必填项已用*标注

Captcha Code