iPhones and Telephone Hyperlinks

by brad 17. October 2008 13:56

It seems that iPhone can't be avoided even while developing on Windows using Visual Studio.  Our client recently asked us to make sure that their telephone number was clickable for iPhone users. 

This being news to me, some quick research confirms that indeed, Apple Safari running on the iPhone magically recognizes telephone numbers and turns them into hyperlinks.  Clever.  Apparently, the hacking community is even more clever though because a Google search for "iphone telephone hyperlink" comes up with a result for a security hole in Apple's approach.  It's been fixed though, so no need to panic.

But back to the real story ... the website we are developing has a phone number on the home page alright, BUT it has letters in it, not numbers.  This makes it easy for people using regular phones, but not so much for the iPhone users since iPhone Safari can't figure out that the letters are part of a phone number.

You can force iPhone to recognize a telephone number by wrapping it in a <a href="tel:1-800-000-0000"> tag but then that confuses every browser that is NOT iPhone Safari.  So that's out unless you are developing a web site specifically for iPhone.

 SO .... now we have a letter-based phone number for regular phone folk and a number-based phone number for iPhone folk.  I'm totally putting "iPhone Developer" on my resume.

Tags:

Comments are closed

About Brad

Brad Tutterow lives in Illinois and works in Missouri. He has 12 years of experience developing web sites and Windows applications using a variety of technologies and is most excited currently about Silverlight, Windows Phone 7, Halo Reach, and Visual Studio 2010.