Sub topic 11
Moving contacts with vCard files
A vCard is a plain text file with the extension .vcf that holds one or more contact cards. It is the common format for moving people between Contacts, other address books, phones, and email attachments. This chapter assumes you can create and edit cards in Contacts (see the contact cards chapter) and that you know where your accounts are set up in System Settings.
What a vCard contains
Each card sits between BEGIN:VCARD and END:VCARD. Each line is a property name, optional parameters, a colon, and a value. Here is a minimal card that you can save as ada.vcf and import.
BEGIN:VCARD
VERSION:3.0
FN:Ada Example
N:Example;Ada;;;
EMAIL;TYPE=INTERNET:[email protected]
TEL;TYPE=CELL:+1-555-0100
END:VCARDFNis the formatted name, the one shown on screen.Nholds the name parts in order: family, given, additional, prefix, suffix.EMAILandTELcarry aTYPEparameter that labels the field, such as home, work, or cell.
A single .vcf file can hold many cards, one after another. Exporting a group or a whole address book produces one file with all of them.
Importing cards
- Open Contacts.
- Choose File > Import and pick the
.vcffile. You can also drag the file onto the Contacts window or double-click it in Finder. - Contacts adds the cards to the account that is selected in the sidebar. If you import several cards, it may ask how to handle duplicates.
The account you choose matters. Cards added to an iCloud account sync to your other devices. Cards added to "On My Mac" stay on this Mac only.
Exporting cards
- Select one or more cards, or select a group in the sidebar and then choose all its cards with Edit > Select All.
- Choose File > Export > Export vCard.
- Name the file and save it.
Choose File > Export > Contacts Archive instead when you want a full backup that can be restored later. An archive keeps data that a plain vCard export can lose, such as group membership.
Sharing a single card
You can drag a card to the Desktop to create a .vcf file, or choose Share from the card's menu to send it by Mail or Messages. The recipient opens the attachment and chooses to add it to Contacts.
Common problems
- Accented characters look garbled. The file was saved in a different text encoding. vCard 3.0 files should be UTF-8. Re-export from the source, or re-save the file as UTF-8.
- Duplicates appear. Importing the same file twice can create copies. Use Card > Look for Duplicates to merge them.
- Photos or notes are missing. Some apps leave these out of a vCard. Check the export options in the source app.
- Only one card imports. The file may have a missing
END:VCARDline. Open it in a text editor and check that each card is closed.
Exercise
Exercise
You import a .vcf file with 40 cards while "On My Mac" is selected in the Contacts sidebar. Your iPhone uses iCloud Contacts. Will the new cards appear on the iPhone, and what would you do to fix it?
Show answer
No. Cards imported into "On My Mac" stay local and do not sync. Select the iCloud account in the sidebar and import again, or drag the cards from "On My Mac" into the iCloud account. Then use Card > Look for Duplicates if copies remain.