2

I am making a call to a number and it is working fine. Is there a way to change the number format of the permission asking popup in swift ?

Here is my code:

if let url = URL(string: "tel://\("
        8680047015 ")"),
    UIApplication.shared.canOpenURL(url) {
        if #available(iOS 10, *) {
            UIApplication.shared.open(url)
        } else {
            UIApplication.shared.openURL(url)
        }
    }

As of now the popup is as follows. I would like to change it to 868-004-7015.enter image description here.

While trying a US number, it is showing as 1234 - 567890. How formatting is happening?

Any help is really appreciated.

Varun P V
  • 1,092
  • 1
  • 12
  • 30
  • Did you try adding country code like `URL(string: "tel:1-868-004-7015")` ? There is a [reference](https://developer.apple.com/library/archive/featuredarticles/iPhoneURLScheme_Reference/PhoneLinks/PhoneLinks.html) documentation for phone numbers. – Omer Faruk Ozturk Jul 03 '20 at 16:23
  • No. I am not adding any country code. passing the number only. – Varun P V Jul 03 '20 at 17:01

0 Answers0