Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The <code>ABPersonCreatePeopleInSourceWithVCardRepresentation</code> docs state that <a href="https://developer.apple.com/library/ios/#documentation/AddressBook/Reference/ABPersonRef_iPhoneOS/Reference/reference.html#//apple_ref/c/func/ABPersonCreatePeopleInSourceWithVCardRepresentation">vCard version 3 is the supported protocol</a>. Unfortunately if you're having troubles with a standard vCard I'm not sure how to help - I did a fair bit of searching (that bounty is good motivation :P) and wasn't able to find any further information.</p> <p>I don't have my iPhone on me to test, but <a href="http://learnyii.blogspot.com/2011/04/vcard-qr-code-iphone-android-blackberry.html">this guy</a> claims to have successfully imported the following, v2.1 vCard on an iPhone 4 using a QR scanner app (which <em>might</em> be using the API in question). <a href="http://en.wikipedia.org/wiki/VCard#Properties">The 3.0 spec is a superset of the 2.1 spec</a> - can you try this vCard and let me know if it works?</p> <pre><code>BEGIN:VCARD VERSION:2.1 N:;Company Name FN:Company Name ORG:Company Name TEL;WORK;VOICE;PREF:+16045551212 TEL;WORK;FAX:+16045551213 ADR;WORK;POSTAL;PARCEL;DOM;PREF:;;123 main street;vancouver;bc;v0v0v0;canada EMAIL;INTERNET;PREF:user@example.com URL;WORK;PREF:http://www.example.com/ NOTE:http://www.example.com/ CATEGORIES:BUSINESS,WORK UID:A64440FC-6545-11E0-B7A1-3214E0D72085 REV:20110412165200 END:VCARD </code></pre> <p>You can read the official 3.0 spec <a href="http://tools.ietf.org/html/rfc2425">here</a> and <a href="http://tools.ietf.org/html/rfc2426">here</a>.</p> <p>As a last ditch solution, there are <a href="https://github.com/search?q=.vcf&amp;p=1&amp;ref=searchbar&amp;type=Repositories&amp;l=Objective-C">plenty of vCard parsers out there</a> - it's a dead simple protocol. You could just take any of these (or write one yourself) and manually add the contact to the Address Book using <a href="https://developer.apple.com/library/ios/#documentation/AddressBook/Reference/ABPersonRef_iPhoneOS/Reference/reference.html#//apple_ref/c/func/ABPersonCreatePeopleInSourceWithVCardRepresentation">ABPersonCreatePeopleInSourceWithVCardRepresentation</a>.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload