Explain the relevant permission settings for adapting iOS10 in detail

  • 2021-08-31 09:27:02
  • OfStack

In the latest version of iOS10 system, if you have access to private data in your project, such as camera, photo album, recording, location, contacts and so on. It involves the issue of authority.

Solution (fix method):

Add in info. plist-Source Code

UsageDescription related to key, the description string can be filled in at will, but 1 must be filled in, otherwise it will cause the problem of invalid package, resulting in uploading and packaging the build version 1 directly not displayed.


<!--  Photo album  --> 
<key>NSPhotoLibraryUsageDescription</key> 
<string>App Your consent is required , To access the album </string> 
<!--  Camera  --> 
<key>NSCameraUsageDescription</key> 
<string>App Your consent is required , To access the camera </string> 
<!--  Microphone  --> 
<key>NSMicrophoneUsageDescription</key> 
<string>App Your consent is required , To access the microphone </string> 
<!--  Position  --> 
<key>NSLocationUsageDescription</key> 
<string>App Your consent is required , To access the location </string> 
<!--  Access location during use  --> 
<key>NSLocationWhenInUseUsageDescription</key> 
<string>App Your consent is required , To access the location during use </string> 
<!--  Always access the location  --> 
<key>NSLocationAlwaysUsageDescription</key> 
<string>App Your consent is required , To always access the location </string> 
<!--  Calendar  --> 
<key>NSCalendarsUsageDescription</key> 
<string>App Your consent is required , To access the calendar </string> 
<!--  Reminders  --> 
<key>NSRemindersUsageDescription</key> 
<string>App Your consent is required , To access reminders </string> 
<!--  Exercise and fitness  --> 
<key>NSMotionUsageDescription</key> <string>App Your consent is required , To access sports and fitness </string> 
<!--  Health update  --> 
<key>NSHealthUpdateUsageDescription</key> 
<string>App Your consent is required , To access health updates  </string> 
<!--  Health sharing  --> 
<key>NSHealthShareUsageDescription</key> 
<string>App Your consent is required , To access health sharing </string> 
<!--  Bluetooth  --> 
<key>NSBluetoothPeripheralUsageDescription</key> 
<string>App Your consent is required , To access Bluetooth </string> 
<!--  Media database  --> 
<key>NSAppleMusicUsageDescription</key> 
<string>App Your consent is required , To access the media database </string>

If it doesn't work, you can request background permissions, something like this:


<key>UIBackgroundModes</key>
<array> 
<!--  Write here that you want to use the permissions corresponding to in background mode key --> 
<string>location</string>
...
</array>

Related articles: