Reputation: 59
I'm trying to place a PhoneCall in a swift application. It works pretty simple with regular phone numbers using the openURL method. However, when I try to use a string that contains an asterix (for example, dial the number (****02), the method returns false. I've tried using string literals with no help.
Is it possible to do so at all? Thanks!
var url:NSURL = NSURL(string: "tel://****02")!
UIApplication.sharedApplication().openURL(url)
Upvotes: 0
Views: 291
Reputation: 21219
... 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. ...
Upvotes: 1
Reputation: 131408
I remember reading an answer from somebody that Apple doesn't allow you to dial numbers that contain "*" or "#". If I remember the thread correctly, the rationale was that those let you do things like log in to automated phone systems, and that should be under the user's control.
Upvotes: 0