iOS 8.3, Xcode 6.3.1, ARC enabled
The question has been resolved, but I have (2) notes to add from my recent participation in the CLLocationManager.
1) The following keys should be entered in your * .plist file:

The most commonly used keys have common more descriptive names, such as "Privacy - Description of the use of location", which is really the key "NSLocationUsageDescription".
To see the names of the "raw" keys, go to "* -Info.plist" and right-click in the "Navigator" area, where the keys are indicated, see below:

And you will get the following results:

Three keys related to this article:

2) Make sure you select and initialize the CLLocationManager implementation before trying to request authorization or update location.
*. h file:
@interface SomeController : UIViewController <CLLocationManagerDelegate> @property (strong, nonatomic) CLLocationManager *locationManager;
*. m file:
- (IBAction)locationButton:(UIButton *)sender { if (self.locationManager == nil) { self.locationManager = [[CLLocationManager alloc] init]; self.locationManager.delegate = self; } else { nil; } if ([self.locationManager respondsToSelector:@selector(requestWhenInUseAuthorization)]) { [self.locationManager requestWhenInUseAuthorization]; } else { nil; } self.locationManager.desiredAccuracy = kCLLocationAccuracyBest; [self.locationManager startUpdatingLocation]; }
Hope this saves you some time! Thank.
serge-k May 14 '15 at 10:49 PM 2015-05-14 22:49
source share