user869305
user869305

Reputation: 151

iOS changes telephone number i try to dial through app delegate

I have an issue with openUrl where iOS is changing the number i am trying to dial. I cant paste the actual number below but i've given the first few digits to hopefully get an answer.

let phoneNumer = "+353-091-xxxxxx"
        if let url = URL(string: "tel://\(phoneNumer)") {
            let application:UIApplication = UIApplication.shared
            if (application.canOpenURL(url)) {
                if #available(iOS 10.0, *) {
                    application.open(url, options: [:], completionHandler: nil)
                } else {
                    application.openURL(url)
                }
            }
        }

For some reason when the number gets passed to openUrl/open for the OS to dial it, the 0 before the 91 gets stripped out. I've tried the following combinations but get the same result:

"tel://+353091xxxxxx"

"tel://353091xxxxxx"

"tel:353-091-xxxxxx"

This is only happening with this number for some reason, it seems to be an issue with the irish country code?

Upvotes: 0

Views: 56

Answers (1)

Shubham Narang
Shubham Narang

Reputation: 534

0 and country code will not needed at the same time.

Please ignore 0 and dial the number again, You will connect with the correct line.

Upvotes: 1

Related Questions