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

iOShepherd picture iOShepherd · Mar 30, 2017 · Viewed 8.7k times · Source

After updating to 10.3, my app no longer automatically dials a phone number after pressing the call button in my app using the openURL: options: completionHandler: method.

Instead, a prompt comes up every time to confirm the user's intentions.

As per the Apple Documentation:

The tel URL scheme is used to launch the Phone app on iOS devices and initiate dialing of the specified phone number. When a user taps a telephone link in a webpage, iOS displays an alert asking if the user really wants to dial the phone number and initiates dialing if the user accepts. When a user opens a URL with the tel scheme in a native app, iOS does not display an alert and initiates dialing without further prompting the user. However, a native app can be configured to display its own alert.

According to this, the prompt displays for webpages but doesn't display in a native iOS app.

Could this be a bug in 10.3? Or is there a new function I need to use or a new property to include in the info.plist I do not know about?

Thanks.

Answer

James P picture James P · Mar 30, 2017

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 new feature that is here to stay.

An issue existed in iOS allowing for calls without prompting. This issue was addressed by prompting a user to confirm call initiation.