xcode8 iOS10上关于NSPhotoLibraryUsageDescription NSCameraUsageDescription 等问题

最近升级了Xcode8.0,真是很多坑啊,填完一个来另外一个,今天又遇到了一个,用Xcode8.0上传项目时被驳回说是info.plist里面没有设置NSPhotoLibraryUsageDescription、NSCameraUsageDescription、NSContactsUsageDescription、NSMicrophoneUsageDescription等字段,之前这些都是预设的不用加,现在强制了,真是郁闷,下面贴上解决方案

被驳回的原因:

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 NSCameraUsageDescription key with a string value explaining to the user how the app uses this data.

大概意思就是得在plist里面必须加上NSPhotoLibraryUsageDescription和NSCameraUsageDescription的键值对才行,之前都是默认的,现在必须加,要不不让通过,真是坑啊~~具体配置如下图:


xcode8 iOS10上关于NSPhotoLibraryUsageDescription NSCameraUsageDescription 等问题_第1张图片

大概统计了一下需要加的一些字段列在下面:

NSContactsUsageDescription -> 通讯录

NSMicrophoneUsageDescription -> 麦克风

NSPhotoLibraryUsageDescription -> 相册

NSCameraUsageDescription -> 相机

NSLocationAlwaysUsageDescription -> 地理位置

NSLocationWhenInUseUsageDescription -> 地理位置

以上工程中如果使用了相关的功能需要添加必要字段

你可能感兴趣的:(xcode8 iOS10上关于NSPhotoLibraryUsageDescription NSCameraUsageDescription 等问题)