IOS10 Permissions Crash issue

Source: Internet
Author: User

Today, the mobile phone upgraded iOS10 Beta, and then with the project being developed with an IPA package, found that click on the right to access directly crash, and output some information in the console:

This app had crashed because it attempted to access privacy-sensitive data without a usage description. The app ' s info.plist must contain an 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 to the Info.plist file to add a description.

1, locate the Info.plist file in the project, right click on an open as, open as source Code

2, copy the following value and Key,key must not be wrong, value seemingly can be filled in casually

Camera Permission Description:

<key>NSCameraUsageDescription</key>
<string>cameraDesciption</string>

Correspondence Record:
<key>NSContactsUsageDescription</key>
<string>contactsDesciption</string>

Microphone:
<key>NSMicrophoneUsageDescription</key>
<string>microphoneDesciption</string>

Camera:
<key>NSPhotoLibraryUsageDescription</key>
<string>photoLibraryDesciption</string>

Eg: other permission description, the debug console will have output, add it yourself OK

Daily update attention: Http://weibo.com/hanjunqiang Sina Weibo!

3, copy on the Info.plist file, and then save it, such as:

The form of Source Code:

The presentation of the property List:

After the 4,clean, the operation is OK.

IOS10 Permissions Crash issue

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.