Externally open the url in browser from app iOS swift
Problem:
I want to open one url from my app to browser.Also validate the url.
How to achieve that?
Solution:
// MARK: - Open web url
func openWeb(urlSting:String) {
if let url = URL(string: urlSting), UIApplication.shared.canOpenURL(url) {
UIApplication.shared.open(url)
}
}
Comments
Post a Comment