[修正] iOS 10 使用相机及相簿闪退的问题修正
2016-10-07 10:54
555 查看
iOS 10 新规定,在取用相机,相簿,联络资讯,麦克风需要在 Version Info 加入指定的 key,否则闪退:
注:将下面的 Key 复制到工程 Option -> Version Info 里(按鼠标右键可以新增 Key)
常用 Key
完整列表:
参考:http://stackoverflow.com/questions/39519773/nsphotolibraryusagedescription-key-must-be-present-in-info-plist-to-use-camera-r
Apple 官方列表:
https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html
注:将下面的 Key 复制到工程 Option -> Version Info 里(按鼠标右键可以新增 Key)
常用 Key
<key>NSPhotoLibraryUsageDescription</key> <string>使用相簿需要您的同意</string> <key>NSCameraUsageDescription</key> <string>使用相机需要您的同意</string> <key>NSContactsUsageDescription</key> <string>使用联络资料需要您的同意</string> <key>NSMicrophoneUsageDescription</key> <string>使用麦克风需要您的同意</string> 2018.01.08 新增:iOS 11.x 必需要加入下列,否則閃退 <key>NSPhotoLibraryAddUsageDescription</key> <string>使用相簿需要您的同意</string>
完整列表:
Apple Music: <key>NSAppleMusicUsageDescription</key> <string>My description about why I need this capability</string> Bluetooth: <key>NSBluetoothPeripheralUsageDescription</key> <string>My description about why I need this capability</string> Calendar: <key>NSCalendarsUsageDescription</key> <string>My description about why I need this capability</string> Camera: <key>NSCameraUsageDescription</key> <string>My description about why I need this capability</string> Contacts: <key>NSContactsUsageDescription</key> <string>My description about why I need this capability</string> Health Share: <key>NSHealthShareUsageDescription</key> <string>My description about why I need this capability</string> Health Update: <key>NSHealthUpdateUsageDescription</key> <string>My description about why I need this capability</string> Home Kit: <key>NSHomeKitUsageDescription</key> <string>My description about why I need this capability</string> Location: <key>NSLocationUsageDescription</key> <string>My description about why I need this capability</string> Location (Always): <key>NSLocationAlwaysUsageDescription</key> <string>My description about why I need this capability</string> Location (When in use): <key>NSLocationWhenInUseUsageDescription</key> <string>My description about why I need this capability</string> Microphone: <key>NSMicrophoneUsageDescription</key> <string>My description about why I need this capability</string> Motion (Accelerometer): <key>NSMotionUsageDescription</key> <string>My description about why I need this capability</string> Photo Library: <key>NSPhotoLibraryUsageDescription</key> <string>My description about why I need this capability</string> Reminders: <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> Speech Recognition: <key>NSSpeechRecognitionUsageDescription</key> <string>My description about why I need this capability</string>
参考:http://stackoverflow.com/questions/39519773/nsphotolibraryusagedescription-key-must-be-present-in-info-plist-to-use-camera-r
Apple 官方列表:
https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html
相关文章推荐
- iOS 10 使用相机及相簿闪退的问题修正
- iOS 10 使用相机相簿闪退的bug修正方法
- ios下打开相机遇到的闪退问题 (Snapshotting a view that has not been rendered results in an empty snapshot.)
- iOS 10 相机相册闪退适配
- 解决关于ios访问相机闪退问题
- iOS开发中使用相机或系统相册的一些问题总结(UIImagePickerController)
- 使用IOS 10 / XCODE 8.1 遇到 libsystem_kernel.dylib`__abort_with_payload问题的解决方法
- iOS 10 调用系统相册相机出现问题:-> 0x183a58d9c <+8>: b.lo 0x183a58db4 ; <+32>
- 【iOS开发】iOS10以后相机、相册等授权问题:The app’s Info.plist must contain an NSMicrophoneUsageDescription key
- android系统相机的使用、及解决拍照闪退的问题
- iOS 解决iOS10相册、相机、麦克风等权限使用问题
- iOS 10 设备权限问题(相机,相册等)
- ios下打开相机遇到的闪退问题 (Snapshotting a view that has not been rendered results in an empty snapshot.)
- android系统相机的使用、及解决拍照闪退的问题
- iOS 10 相册相机闪退bug
- iOS开发 iOS10访问权限的配置(解决访问奔溃问题,包括相册/相机等)
- iOS 10 开发之权限Crash 相机相册等权限的使用、检测并引导用户开启权限
- iOS 10 设备权限问题(相机,相册等)
- iOS开发之千呼万唤始出来iOS10更新内容以及iOS 10的闪退问题解决
- IOS开发笔记之十四——使用系统相册或相机导致状态栏隐藏的问题(bug总结四)