gpt4 book ai didi

ios - Swift 的 openURL 方法不会调用带有星号的电话 (iOS 8.4)

转载 作者:行者123 更新时间:2023-11-29 01:52:17 25 4
gpt4 key购买 nike

我正在尝试在 swift 应用程序中放置 PhoneCall。使用 openURL 与常规电话号码配合使用非常简单方法。但是,当我尝试使用包含星号的字符串时(例如,调用号码 (****02)),该方法返回 false。我试过在没有帮助的情况下使用字符串文字。

有可能这样做吗?谢谢!

    var url:NSURL = NSURL(string: "tel://****02")!
UIApplication.sharedApplication().openURL(url)

最佳答案

Phone Links

... To prevent users from maliciously redirecting phone calls or changing the behavior of a phone or account, the Phone app supports most, but not all, of the special characters in the tel scheme. Specifically, if a URL contains the * or # characters, the Phone app does not attempt to dial the corresponding phone number. ...

关于ios - Swift 的 openURL 方法不会调用带有星号的电话 (iOS 8.4),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31271013/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com