5

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

xrave3
  • 235
  • 1
  • 5
  • 11
  • Let's say someone changes it to "Confirm that you want to save a baby?" and they would, of course, confirm, now unwillingly letting you use their location. There's a reason we can't change it. – DanRedux Apr 23 '12 at 03:33
  • Dan, I'm not speaking about the bold text - where the only variable is the app name, but rather the lighter text underneath the "X APP would like to use your location". I've seen custom text placed here in some apps. Sorry for the miscommunication. Any ideas here? – xrave3 Apr 23 '12 at 04:06

1 Answers1

8

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.

Steve
  • 1,840
  • 17
  • 20