Answer the question
In order to leave comments, you need to log in
How to open a link in Safari on iOS?
how to open a link in safari?
for example, on android, to open a link specifically in chrome, we form is googlechrome://navigate?url=https://yandex.ru/
it possible to do something similar on iOS? open in safari or even in the same chrome, i.e. forced in some application
Answer the question
In order to leave comments, you need to log in
http and https links open in Safari:
if let url = URL(string: "http://google.com") {
UIApplication.shared.open(url, options: [:], completionHandler: nil)
}
if let url = URL(string: "http://google.com".replacingOccurrences(of: "http", with: "googlechrome")) {
UIApplication.shared.open(url, options: [:], completionHandler: nil)
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question