How to open a url in system default browser by using Swift as programming language and OSX as plattform.
I found a lot with UIApplication like
UIAppl
Swift 3 or later
import Cocoa
let url = URL(string: "https://www.google.com")!
if NSWorkspace.shared.open(url) {
print("default browser was successfully opened")
}
macOS:
NSWorkspace.sharedWorkspace().openURL(NSURL(string: "https://google.com")!)
iOS:
UIApplication.sharedApplication().openURL(NSURL(string: "https://google.com")!)