tel:// url to show number as 155 666 908

159 Views Asked by At

I am trying to show the number on iPhone dialer pad with spaces using tel:// url.

Wanted to show the number as xxx xxx xxx but when I directly give spaces in number string it wont show the number to dial.

Even I tried following code to

var url = "tel://155".addingPercentEncoding(withAllowedCharacters: charSet)
url = url! + "666"
url = url?.addingPercentEncoding(withAllowedCharacters: charSet)
url = url! + "908"
let telUrl = URL(string: url!)

but nothing works.

Can someone suggest me the way to to this?

Thank you

1

There are 1 best solutions below

0
On

instead of space try adding hyphen (-).