Created
May 14, 2016 21:26
-
-
Save nfarah86/8815467660d72548ab0f00d914e6d432 to your computer and use it in GitHub Desktop.
Inform the Delegate with authorization status change
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// omitted code | |
- (void)locationManager:(CLLocationManager *)manager didChangeAuthorizationStatus:(CLAuthorizationStatus)status | |
{ | |
switch (status) | |
{ | |
case kCLAuthorizationStatusNotDetermined: | |
NSLog(@"Location services authorization status not yet determined."); | |
break; | |
case kCLAuthorizationStatusDenied: | |
NSLog(@"Location services authorization was denied."); | |
break; | |
case kCLAuthorizationStatusRestricted: | |
NSLog(@"Location services authorization is restricted."); | |
break; | |
case kCLAuthorizationStatusAuthorizedAlways: | |
case kCLAuthorizationStatusAuthorizedWhenInUse: | |
NSLog(@"Location services authorization granted. Requesting location updates..."); | |
[self.locationManager startUpdatingLocation]; | |
self.updating = YES; | |
break; | |
default: | |
break; | |
} | |
} | |
// omitted code |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment