Ios – How to launch Safari from an iPhone app

ioslaunchsafari

This might be a rather obvious question, but can you launch the Safari browser from an iPhone app?

Best Solution

should be the following :

NSURL *url = [NSURL URLWithString:@"http://www.stackoverflow.com"];

if (![[UIApplication sharedApplication] openURL:url]) {
    NSLog(@"%@%@",@"Failed to open url:",[url description]);
}