Importing vCards from a website into iOS’s Contacts.app I have a web page with tables full of people &amp; their contact information. I started writing a pairing of php &amp; javascript to automagically generate vCards (*.vcf) for each contact. Half way through this process I’ve discovered that iOS is none too cooperative with .vcf downloaded by Mobile Safari.

When a .vcf files is received via MMS or as an email attachment, iOS provides a very obvious &amp; simple interface for adding it as a new contact. I expected Mobile Safari to exhibit similar behavior to Messages &amp; Mail, but that is not the case.

With Dropbox installed, on my iPhone or iPad, things look like:

Mobile Safari “handles” a .vcf file http://mlkshk.com/r/66OX

Without Dropbox installed, Mobile Safari just throws up its hands and says it cannot download the file.

Anyone have a way forward on this one? Is there a way to coerce Mobile Safari into doing something meaningful with the .vcf file? Will this be supported in iOS 5? Wy on earth is it not supported now? Is there another way to markup the contact information so that Mobile Safari will allow for seamless creation of a new entry in Contacts? Microformats, serving the .vcf up with a MIME of text/plain, some markup &amp; JavaScript bookmarklet (clumsy and awkward as they may be), etc. ?

N.B.


I want to know if this can be done on iOS using Mobile Safari. I’m
not looking for work arounds that involve syncing with a desktop
machine, using Dropbox, or some other 3rd party app.
Yes, I
understand that sending a user the .vcf file as an attachment via
email is an option (a terrible, time consuming, non-elegant option
which requires the user to enter their email address without typos
or otherwise bolloxing things up).
I also understand that &lt;a
href="tel:+1 617.555.1234"&gt;phone&lt;/a&gt; can create a new contact with
a tap &amp; hold (this too is a terrible, time consuming, non-elegant
option which requires the user to remember &amp; then enter the
person’s name without typos, otherwise bolloxing things up, and then
forces them to tap, hold repeat, for each piece of info [phone,
email, address, home phone, home email, website, …])
I expect you found my solution on Stack Overflow but if not you can see the source code and full description at http://www.mobicontact.info or on Stack Overflow

BTW - it involves wrapping the VCARD (.vcf) file inside a Calendar appointment (.ics) which IS handled by mobile Safari.  All the required user agent sniffing and PHP to auto create the calendar appointement is included.  Feel free to use the code, post a comment or up vote on Stack Overflow to spread the word.  Enjoy and good luck.