简体   繁体   English

在iOS 10.3上尝试使用tel://方案拨打电话号码时提示

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

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. 更新到10.3后,我的应用程序不再使用openURL:options:completedHandler:方法在应用程序中按通话按钮后自动拨打电话号码。

Instead, a prompt comes up every time to confirm the user's intentions. 而是每次都会出现提示,以确认用户的意图。

As per the Apple Documentation: 根据Apple文档:

The tel URL scheme is used to launch the Phone app on iOS devices and initiate dialing of the specified phone number. tel URL方案用于在iOS设备上启动Phone应用程序,并启动对指定电话号码的拨号。 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. 当用户点击网页中的电话链接时,iOS会显示警报,询问用户是否真的要拨打电话号码,并在用户接受时启动拨号。 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. 当用户在本机应用程序中使用tel方案打开URL时,iOS不会显示警报,并且会在不进一步提示用户的情况下启动拨号。 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. 据此,提示会显示网页,但不会显示在本机iOS应用中。

Could this be a bug in 10.3? 这可能是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? 还是有我需要使用的新功能或新属性包含在我不知道的info.plist中?

Thanks. 谢谢。

This is listed as a known issue in the 10.3 release notes. 在10.3发行说明中将其列为已知问题。

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

openURL 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. 当第三方应用程序在tel://,facetime://或facetime-audio:// URL上调用openURL:时,iOS将显示提示,并要求用户在拨号前进行确认。

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. 10.3更新的“ 安全性”内容中也列出了该功能,因此我假设这是一个新功能,将保留下来。

An issue existed in iOS allowing for calls without prompting. iOS中存在一个问题,允许在没有提示的情况下进行呼叫。 This issue was addressed by prompting a user to confirm call initiation. 通过提示用户确认呼叫启动来解决此问题。

This is not the first time, Apple developers have reactivated this alert for url schemes? 这不是第一次,Apple开发人员已针对URL方案重新激活此警报吗? I remember that they did this kind activation, even in few other earlier updates, and they rolled back in the next OS update. 我记得他们甚至在其他一些较早的更新中都进行了这种激活,并且在下一个OS更新中回滚了它们。

In the case of 10.3.1, I read a news that in the US there were many 911 calls fraudulently dialed. 在10.3.1的情况下,我读到一条消息,在美国,有许多911电话被欺诈地拨打。 https://9to5mac.com/2017/03/06/911-ios-exploit/ https://9to5mac.com/2017/03/06/911-ios-exploit/

In my opinion, the alert restriction has been incorporated to put stop for wrong 911 dials. 我认为,已合并了警报限制,以阻止错误的911拨盘停止。

I am confident that, Apple cannot enforce this kind of arbitrary changes to API's/Schemes quite often and then, which is largely affecting the user's experience. 我有信心,Apple不能经常对API /方案进行这种任意更改,这在很大程度上影响了用户的体验。

I have a Speed Dial App in the store for the last 8 years. 过去8年中,我在商店中都有一个快速拨号应用程序。 https://itunes.apple.com/us/app/speed-dial/id306569903?ls=1&mt=8# In the last few weeks, so many users are complaining about this new restriction of one more touch on the speed dial. https://itunes.apple.com/cn/app/speed-dial/id306569903?ls=1&mt=8#在过去的几周中,如此之多的用户都在抱怨这种新的限制,即对快速拨号的另一种限制。

For now, we have to wait until Apple fixes this known issue in the next update. 目前,我们必须等到Apple在下一个更新中修复此已知问题。 Because, there are 100s productivity apps, which rely on the URL scheme and no alert scheme. 因为,有100多个生产力应用程序,它们依赖于URL方案而没有警报方案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM