How to add app explanation for location service in settings
Asked Answered
S

3

5

I would like to add app explanation for location service usage in setting like below image. Does anyone have idea how to do this? Thanks! app explanation for location service

Slesvig answered 4/8, 2016 at 3:34 Comment(1)
If you want to add some information about your app in iPhone's setting. You can use "Bundle Settings." tutorialMaidenhead
F
7

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

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

see the below image

enter image description here

see the result below

enter image description here

Fortnight answered 4/8, 2016 at 3:46 Comment(0)
C
1

You can add the code in 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 location service permission.

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];
            }
        }
Catina answered 4/8, 2016 at 3:57 Comment(0)
C
1

@Rurouni's answer is perfect.

Some Updates in Xcode 8. They give us list of Privacy in plist.

From that we can add :

Privacy - Location Usage Description

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

enter image description here

Commonweal answered 4/8, 2016 at 4:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.