UIWebView doesn't detect phone number links

nurnachman picture nurnachman · Jul 11, 2012 · Viewed 8.4k times · Source

I'm building an app with a UIWebView in it.

The webView should load html that includes tel: links:

<a href="tel:123456789">call me</a>

The webView doesn't make the "call me" link to be clickable.

I tried

webView.dataDetectorTypes = UIDataDetectorTypePhoneNumber

But doesn't work.

I looked in all the stackOverflow Q&A's and found no answer specific to this problem.

Thanks for your help, Nur

Answer

sschunara picture sschunara · Jul 11, 2012

replace

<a href="tel:123456789"> call me </a>

with

<a href="tel://123456789">call me</a>

Hope it works for you.