IOS10 Getting system permissions

Source: Internet
Author: User

IOS 10 is more strict in the management of the system privacy rights, if you do not set it will crash directly, the general solution is to add the corresponding key-value in the Info.plist file.

<!--Albums--

<key>NSPhotoLibraryUsageDescription</key>

<string>app need your consent in order to access the album </string>

<!--camera--

<key>NSCameraUsageDescription</key>

<string>app requires your consent to access the camera </string>

<!--Microphones--

<key>NSMicrophoneUsageDescription</key>

<string>app need your consent to access the microphone </string>

<!--location--

<key>NSLocationUsageDescription</key>

<string>app need your consent to access the location </string>

<!--access to location during use--

<key>NSLocationWhenInUseUsageDescription</key>

<string>app requires your consent in order to access the location during use </string>

<!--always access location-

<key>NSLocationAlwaysUsageDescription</key>

<string>app requires your consent in order to always access the location </string>

<!--calendar--

<key>NSCalendarsUsageDescription</key>

<string>app need your consent in order to access the calendar </string>

<!--reminders--

<key>NSRemindersUsageDescription</key>

<string>app need your consent in order to access reminders </string>

<!--sports and fitness--

<key>NSMotionUsageDescription</key> <string>app need your consent to access sports and fitness </string>

<!--Health Updates-

<key>NSHealthUpdateUsageDescription</key>

<string>app need your consent to access health updates </string>

<!--health Sharing--

<key>NSHealthShareUsageDescription</key>

<string>app need your consent in order to access health sharing </string>

<!--Bluetooth--

<key>NSBluetoothPeripheralUsageDescription</key>

<string>app need your consent to access Bluetooth </string>

<!--Media Archive--

<key>NSAppleMusicUsageDescription</key>

<string>app need your consent to access the Media Library </string>

IOS10 Getting system permissions

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.