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
scheme. Specifically, if a URL contains the tel
or *
characters, the Phone app does not attempt to dial the corresponding phone number."#
Check this link:
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