How to add application description for location service in settings

I would like to add a description of the application to use the distribution service in the settings, as shown below. Does anyone know how to do this? Thank you location service application explanation

+5
source share
3 answers

You can add an explanation in Info.plist to your Xcode project.

<key>NSLocationAlwaysUsageDescription</key> <string>The applicaiton requires location services to workss</string> 

see image below

enter image description here

see result below

enter image description here

+6
source

You can add code to info.plist

 <key>NSLocationAlwaysUsageDescription</key> <string>This application requires location services to work</string> <key>NSLocationWhenInUseUsageDescription</key> <string>This application requires location services to work</string> 

enter image description here

and also check the resolution of the location service.

 if([CLLocationManager locationServicesEnabled]){ NSLog(@"Location Services Enabled"); if([CLLocationManager authorizationStatus]==kCLAuthorizationStatusDenied){ alert = [[UIAlertView alloc] initWithTitle:@"App Permission Denied" message:@"To re-enable, please go to Settings and turn on Location Service for this app." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil]; [alert show]; } } 
+1
source
Answer to

@Rurouni is perfect.

Some updates in Xcode 8. They give us a list of sensitive data in plist.

From this you can add:

Privacy - Location Use Description

 <key>NSLocationUsageDescription</key> <string>This application will use location service for user location sharing.</string> 

enter image description here

+1
source

All Articles