Skip to content

Instantly share code, notes, and snippets.

@sdgandhi
Created March 18, 2015 18:56
Show Gist options
  • Save sdgandhi/6917822a68a01dba325c to your computer and use it in GitHub Desktop.
Save sdgandhi/6917822a68a01dba325c to your computer and use it in GitHub Desktop.
iOS location permission denied
[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