This code snippet helps you to open a webpage in Safari.
Code uses openURL to load the webpage in the web browser.
Write this function as an action to a button………
- ( IBAction ) loadWebPageInSafari : ( id ) sender { NSURL *my_URL = [NSURL URLWithString:[Your_URL stringValue]]; if ( [ [NSWorkspace sharedWorkspace] openURL : my_URL ] ){ NSLog(@” URL Loaded................”); }else{ NSLog(@" Failed to Load URL....."); } }