Opening links in Safari / Embedded Safari – iOS

In iOS you can either do it with a push:

let safariVC = SFSafariViewController(url: URL(string: “www.google.com”)!, configuration: .init())

 

present(safariVC, animated: true, completion: nil)

 

or directly in the Safari app:

UIApplication.shared.open(URL(string:www.google.com”)!, options: [:]) { (_) in }

 

Very practical, 

 

Marc