Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

changing the Geo-Location permission notification text in iOS

Many iOS apps which use geo-location pop up a permission-based notitifcation stating:

"X app would like to use your location. Confirm it's OK" and the user may confirm or not to turn this ON or leave it OFF.

How can you adjust the text inside this notification? (in xCode)

NOTE: I'm NOT speaking about the bold confirm text - where the only variable is the app name, but rather the lighter text UNDERNEATH the bold text "X APP would like to use your location" and ABOVE the Confirm button. I've seen custom text placed here in some apps.

I sincerely appreciate any insights

like image 842
xrave3 Avatar asked Apr 23 '12 03:04

xrave3


1 Answers

There is a property of CLLocationManager - @property purpose - it's an NSString. Set this after instantiating your CLLocationManager. This is displayed when your application asks permission to use location.

You can set it as follows:

CLLocationManager *locMgr = [[CLLocationManager alloc] init];
[locMgr setPurpose:@"State your purpose here"];

This will show up below the bolded text in the permission alert.

like image 168
Steve Avatar answered Sep 30 '22 04:09

Steve