ios User Prompt when making outgoing call via URL Scheme 10.2+

送分小仙女□ 提交于 2019-11-27 08:24:32

问题


It appears that Apple have changed the behaviour when making a phone call via the URL Scheme. We currently use this code to initiate a phone call:

let url = NSURL(string: "tel://011111111111")
UIApplication.sharedApplication().openURL()

Prior to iOS 10.2, this immediately launched the dialler and placed the phone call. It appears that this has now changed, and the user receives a prompt to confirm to make the phone call. It appears tel:// is behaving more like telprompt://. This is despite the official Apple URL Scheme document (last updated 2015) mentioning that user interaction is not required if a tel:// URL is opened from a native app.

Does anyone know if (a) this is new, expected behaviour and/or (b) if there is another way around this to initiate a phone call, without prompting the user?


回答1:


Unfortunately the version 10.3 to restricted the direct calls phone and facetime.

Check yourself:

https://developer.apple.com/library/content/releasenotes/General/RN-iOSSDK-10.3/

https://support.apple.com/en-gb/HT207617



来源:https://stackoverflow.com/questions/43249526/ios-user-prompt-when-making-outgoing-call-via-url-scheme-10-2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!