Xcode报错专区iOS Developer

Xcode8权限适配

2017-06-02  本文已影响36人  跨境大师兄

Xcode8以后出现App打包后无法在itunesconnect 构建版本。需要修改下info.plist添加相应权限
iOS10,苹果加强了对隐私数据的保护,要对隐私数据权限做一个适配的权限访问描述。
打开info.plist开始修改

Privacy - Microphone Usage Description //麦克风权限
Privacy - Contacts Usage Description //通讯录权限
Privacy - Camera Usage Description //摄像头权限
Privacy - NSSiriUsageDescription //Siri的权限
Privacy - Bluetooth Peripheral Usage Description //蓝牙
Privacy - Reminders Usage Description //提醒事项
Privacy - Motion Usage Description //运动与健康
Privacy - Media Libaray Usage Description //媒体资源库
Privacy - Calendars Usage Description //日历

也可以 右击plist文件Open As > Source Code复制粘贴修改

<key>NSPhotoLibraryUsageDescription</key>
<string>App需要您的同意,才能访问相册</string>
<key>NSCameraUsageDescription</key>
<string>App需要您的同意,才能访问相机</string>
<key>NSMicrophoneUsageDescription</key>
<string>App需要您的同意,才能访问麦克风</string>
<key>NSLocationUsageDescription</key>
<string>App需要您的同意,才能访问位置</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>App需要您的同意,才能在使用期间访问位置</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>App需要您的同意,才能始终访问位置</string>
<key>NSCalendarsUsageDescription</key>
<string>App需要您的同意,才能访问日历</string>
<key>NSRemindersUsageDescription</key>
<string>App需要您的同意,才能访问提醒事项</string>
<key>NSMotionUsageDescription</key>
<string>App需要您的同意,才能访问运动与健身</string>
<key>NSHealthUpdateUsageDescription</key>
<string>App需要您的同意,才能访问健康更新 </string>
<key>NSHealthShareUsageDescription</key>
<string>App需要您的同意,才能访问健康分享</string>
<key>NSBluetoothPeripheralUsageDescription</key>
<string>App需要您的同意,才能访问蓝牙</string>
<key>NSAppleMusicUsageDescription</key>
<string>App需要您的同意,才能访问媒体资料库</string>

上一篇 下一篇

猜你喜欢

热点阅读