<分区>
如何调用USSD
以编程方式为 iphone 编写代码?
我搜索并发现 iOS 7
已经阻止使用 USSD
出于安全原因,在 iOS7 以下的 iPhone 中,我们可以手动调用 USSD 代码,但不能以编程方式调用。
任何人都有想法,我们可以像这样以编程方式调用 USSD 吗:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel:\*123* <2334555>#"]]
?
<分区>
如何调用USSD
以编程方式为 iphone 编写代码?
我搜索并发现 iOS 7
已经阻止使用 USSD
出于安全原因,在 iOS7 以下的 iPhone 中,我们可以手动调用 USSD 代码,但不能以编程方式调用。
任何人都有想法,我们可以像这样以编程方式调用 USSD 吗:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel:\*123* <2334555>#"]]
?
最佳答案
您不能调用包含 * 或 # 字符的号码。出于安全原因,Apple 不允许在拨号字符串中使用它们。
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. If your app receives URL strings from the user or an unknown source, you should also make sure that any special characters that might not be appropriate in a URL are escaped properly. For native apps, use the stringByAddingPercentEscapesUsingEncoding: method of NSString to escape characters, which returns a properly escaped version of your original string.
关于ios - 以编程方式从 iphone 调用 USSD 代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19589344/