OpenURL in iOS10

Swift 3+: func open(scheme: String) { if let url = URL(string: scheme) { if #available(iOS 10, *) { UIApplication.shared.open(url, options: [:], completionHandler: { (success) in print(“Open \(scheme): \(success)”) }) } else { let success = UIApplication.shared.openURL(url) print(“Open \(scheme): \(success)”) } } } Usage: open(scheme: “tweetbot://timeline”) Source

How to use openURL for making a phone call in Swift?

I am pretty sure you want: UIApplication.sharedApplication().openURL(NSURL(string: “tel://9809088798”)!) (note that in your question text, you put tel//:, not tel://). NSURL’s string init expects a well-formed URL. It will not turn a bunch of numbers into a telephone number. You sometimes see phone-number detection in UIWebView, but that’s being done at a higher level than NSURL. … Read more

Prompt when trying to dial a phone number using tel:// scheme on iOS 10.3

This is listed as a known issue in the 10.3 release notes. https://developer.apple.com/library/content/releasenotes/General/RN-iOSSDK-10.3/ openURL When a third party application invokes openURL: on a tel://, facetime://, or facetime-audio:// URL, iOS displays a prompt and requires user confirmation before dialing. It is also listed in the Security content of the 10.3 update, so I’m assuming this a … Read more