Open URL with Safari no matter what system browser is set to
- by Mark
In my objective-c program, I need to open a URL in Safari no matter what the system's default browser is. That means that this won't work, because it could launch Firefox or whatever other browser:
NSWorkspace * ws = [NSWorkspace sharedWorkspace];
[ws openURL: url];
I think I'm close with this:
[ws launchAppWithBundleIdentifier: @"com.apple.Safari"
options: NSWorkspaceLaunchWithoutActivation
additionalEventParamDescriptor: NULL
launchIdentifier: nil];
only need to figure out how to pass in the URL as parameter... Is there an easier way?
Thanks!