Does tel URL scheme supports '*' and '#' special characters?

As per Apple doc, "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."

Check this link:

https://developer.apple.com/library/content/featuredarticles/iPhoneURLScheme_Ref erence/PhoneLinks/PhoneLinks.html#//appl…


But it is working if tried this code:(tel scheme is allowing * and # characters)


let phoneString = "tel://*121#" //contains * and # characters


if let phoneURL = URL(string: phoneString) {

if UIApplication.shared.canOpenURL(phoneURL) {

let cancelAction = UIAlertAction.init(title: "Cancel", style: UIAlertActionStyle.cancel, handler: nil)

var actions = [cancelAction]

let callAction = UIAlertAction.init(title: "Call", style: UIAlertActionStyle.default, handler: {(alert: UIAlertAction!) in

UIApplication.shared.openURL(phoneURL)

LOG.ui("Dialing patient number")

})

actions.append(callAction)

AlertViewManager.sharedInstance.ShowAlert("Call Number", message: phoneNumber, actions: actions)

} else {

AlertViewManager.sharedInstance.ShowOkAlert("Cannot call", message: "Your device does not support dialing phone numbers.", handler: nil)

}

} else {

LOG.error("Could not build phone URL out of \"\(callNumber)\"")

AlertViewManager.sharedInstance.ShowOkAlert("Cannot call", message: "The listed phone number is not valid.", handler: nil)

}


So my question is whether it pass Apple Review?

iPhone 5s, iOS 11.2.5, null

Posted on Mar 16, 2018 4:36 AM

Reply

There are no replies.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Does tel URL scheme supports '*' and '#' special characters?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.