I wanted to launch settings app from an alert like you see below:
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{ NSString *title = [alertView buttonTitleAtIndex:buttonIndex];
if([title isEqualToString:@"Ok"])
{
NSLog(@"Ok was selected.");
}
else if([title isEqualToString:@"Safari"])
{
NSLog(@"open Safari was selected.");
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=General"]];
}
}
I used prefs:root=General, but then I read from the link below...
iOS Launching Settings -> Restrictions URL Scheme
...that this is not possible in ios5.1. Infact it does not work in the simulator. what can I do?? Thanks for the help