Created
February 7, 2014 16:47
-
-
Save alvareztech/8866627 to your computer and use it in GitHub Desktop.
iOS: Ask if location service is enabled and with permission.
This file contains hidden or 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
if ([CLLocationManager locationServicesEnabled]) { | |
NSLog(@"Servicio de localización habilitado."); | |
if([CLLocationManager authorizationStatus] == kCLAuthorizationStatusDenied) { | |
NSLog(@"Servicio de localización habilitado sin permiso de uso."); | |
} else { | |
NSLog(@"Servicio de localización habilitado con permiso de uso."); | |
} | |
} else { | |
NSLog(@"Servicio de localización deshabilitado."); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment