感谢@rmaddy,我说这只是在Info.plist中其他密钥字符串对后解决了这一问题:
<key>NSPhotoLibraryUsageDescription</key>
<string>Photo Library Access Warning</string>
编辑:
我也结束了有类似的问题在我的应用程序的不同组件上。最后将所有这些键到目前为止(更新至Xcode8/iOS10后):
<key>NSPhotoLibraryUsageDescription</key>
<string>This app requires access to the photo library.</string>
<key>NSMicrophoneUsageDescription</key>
<string>This app does not require access to the microphone.</string>
<key>NSCameraUsageDescription</key>
<string>This app requires access to the camera.</string>
结帐这个developer.apple.com链接完整列表属性列表键引用的。
完整名单:
苹果音乐:
<key>NSAppleMusicUsageDescription</key>
<string>My description about why I need this capability</string>
蓝牙:
<key>NSBluetoothPeripheralUsageDescription</key>
<string>My description about why I need this capability</string>
日历:
<key>NSCalendarsUsageDescription</key>
<string>My description about why I need this capability</string>
相机:
<key>NSCameraUsageDescription</key>
<string>My description about why I need this capability</string>
联系人:
<key>NSContactsUsageDescription</key>
<string>My description about why I need this capability</string>
健康分享:
<key>NSHealthShareUsageDescription</key>
<string>My description about why I need this capability</string>
健康更新:
<key>NSHealthUpdateUsageDescription</key>
<string>My description about why I need this capability</string>
主场队服:
<key>NSHomeKitUsageDescription</key>
<string>My description about why I need this capability</string>
地点:
<key>NSLocationUsageDescription</key>
<string>My description about why I need this capability</string>
位置(总是):
<key>NSLocationAlwaysUsageDescription</key>
<string>My description about why I need this capability</string>
位置(使用时):
<key>NSLocationWhenInUseUsageDescription</key>
<string>My description about why I need this capability</string>
麦克风:
<key>NSMicrophoneUsageDescription</key>
<string>My description about why I need this capability</string>
运动(加速度):
<key>NSMotionUsageDescription</key>
<string>My description about why I need this capability</string>
图片库:
<key>NSPhotoLibraryUsageDescription</key>
<string>My description about why I need this capability</string>
提醒:
<key>NSRemindersUsageDescription</key>
<string>My description about why I need this capability</string>
的Siri:
<key>NSSiriUsageDescription</key>
<string>My description about why I need this capability</string>
语音识别:
<key>NSSpeechRecognitionUsageDescription</key>
<string>My description about why I need this capability</string>
见http://stackoverflow.com/a/39476283/1226963为了什么要添加到Info.plist中的例子。此外,只要在'NSPhotoLibraryUsageDescription'上搜索一下就可以找到很多例子。 – rmaddy