IOS10 Permissions Crash issue
Today, mobile phone upgrade iOS10 Beta, and then with the development of the project installed a IPA package, found that click on access to relevant rights directly crash, and the console output some information:
This is the app has crashed because it attempted to access privacy-sensitive data without a usage. The app ' s info.plist must contain a nscontactsusagedescription key with a string value explaining to the user how the app uses this data.
It means: You need to add a "nscontactsusagedescription" Key,value in the Info.plist file to add a description.
1, find the Info.plist file in the project, right-click an open as, open as source Code
2, respectively copy the following value and Key,key must not be wrong, value seemingly can be casually filled out
Camera Permission Description:
<key>NSCameraUsageDescription</key>
<string>cameraDesciption</string>
Communication record:
<key>NSContactsUsageDescription</key>
<string>contactsDesciption</string>
Microphone:
<key>NSMicrophoneUsageDescription</key>
<string>microphoneDesciption</string>
Camera:
<key>NSPhotoLibraryUsageDescription</key>
<string>photoLibraryDesciption</string>
Eg: other permission descriptions, debug console will have output, add on your own OK
3, copy on the Info.plist file, and then save, as shown in the following figure:
The form of Source Code:
The display form of the property List:
After 4,clean, it's OK to run.
Thank you for reading, I hope to help you, thank you for your support for this site!