Created
March 18, 2015 18:56
-
-
Save sdgandhi/6917822a68a01dba325c to your computer and use it in GitHub Desktop.
iOS location permission denied
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
[UIAlertView bk_showAlertViewWithTitle:@"Location is disabled" | |
message:@"To enable location you need " | |
"to set location to 'Always' in Settings > <#app name#> > Location" | |
cancelButtonTitle:@"Cancel" | |
otherButtonTitles:@[ @"Settings" ] | |
handler:^(UIAlertView *alertView, NSInteger buttonIndex) | |
{ | |
if (buttonIndex == 1) { | |
// Send the user to the Settings for this app | |
NSURL *settingsURL = [NSURL URLWithString:UIApplicationOpenSettingsURLString]; | |
[UIApplication.sharedApplication openURL:settingsURL]; | |
} | |
}]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment