更新Xcode8以后(iOS10),App使用相機,相冊,麥克風,定位等等之類的系統(tǒng)權(quán)限時,需要在info.plist中增加相關(guān)配置,不然在編譯的時候,會閃退...
- 相機NSCameraUsageDescription
- 相冊NSPhotoLibraryUsageDescription
- 通訊錄NSContactsUsageDescription
- 始終訪問位置NSLocationAlwaysUsageDescription
- 位置NSLocationUsageDescription
- 在使用期間訪問位置NSLocationWhenInUseUsageDescription
- 麥克風NSMicrophoneUsageDescription
- 訪問藍牙NSBluetoothPeripheralUsageDescription
- 訪問日歷NSCalendarsUsageDescription
- 訪問媒體資料庫NSAppleMusicUsageDescription
- 訪問健康分享NSHealthShareUsageDescription
- 訪問健康更新NSHealthUpdateUsageDescription
- 訪問運動與健身NSMotionUsageDescription
- 訪問提醒事項NSRemindersUsageDescription
PS:分享一下筆者在開發(fā)中遇到的錯誤:
This app has crashed because it attempted 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.
- 解決辦法:
相機權(quán)限
<key>NSCameraUsageDescription<key>
<string>cameraDesciption<string>
相冊權(quán)限
<key>NSPhotoLibraryUsageDescription<key>
<string>photoLibraryDesciption<string>