At the moment I have an application that uses the users current geographic location.
Whenever I run the application on my device or simulator, the app opens and immediately turns my Location Services from "Authorized" to "Not Determined". For some reason this is only happening to me and none of my other developers.
I'm not sure if this is a problem with Xcode, which I updated to 6.01 last night, or something in my code.
I've tried resetting the Location Services for the application, but immediately when I go back to the application it changes it back to "Not Determined".
Any idea what is causing this issues? Has anyone run into a similar problem?
Below is a snippet of code from my locationManager.
- (void)locationManager:(CLLocationManager *)manager didChangeAuthorizationStatus:(CLAuthorizationStatus)status{
NSLog(@"did change status");
if ([CLLocationManager authorizationStatus] == kCLAuthorizationStatusNotDetermined) {
NSLog(@"not determined");
} else if ([CLLocationManager authorizationStatus] == kCLAuthorizationStatusAuthorized) {
NSLog(@"Authorized");
[[NSNotificationCenter defaultCenter] postNotificationName:@"Location Services Authorized" object:self];
} else if ([CLLocationManager authorizationStatus] == kCLAuthorizationStatusRestricted){
NSLog(@"restricted");
[[NSNotificationCenter defaultCenter] postNotificationName:@"Location Services Restricted" object:self];
} else if ([CLLocationManager authorizationStatus] == kCLAuthorizationStatusDenied) {
NSLog(@"denied");
[[NSNotificationCenter defaultCenter] postNotificationName:@"Location Services Denied" object:self];
} else {
NSLog(@"can not");