Update: iOS 6 deprecated the purpose property and it now has to be set in your Info.plist with the key NSLocationUsageDescription which is displayed in Xcode as Privacy – Location Usage Description. If you’re still supporting iOS 5 and earlier make sure you include both.
A great, but underused location feature on iOS is the purpose property of the CLLocationManager.
So many apps ask for your location – give your users confidence in sharing their location by telling them why you need it!
locationManager.purpose = @"We'll only use your location to show you local events nearby.";
You need to do this before you start the location monitoring, so:
CLLocationManager *locationManager = [[CLLocationManager alloc] init]; locationManager.purpose = @"We'll only use your location to show you local events nearby."; locationManager.delegate = self; [locationManager startUpdatingLocation];
I’ve no idea why this is so rarely used, it’s been available since iOS 3.2.
Tip from the Apple docs:
You must set the value of this property prior to starting any location services. Because the string is ultimately displayed to the user, you should always load it from a localized strings file.