I recently found myself in a bit of a situation. My sister’s iPhone died about a week ago and she had not backed it up in quite a while. She had added a lot of contacts since her last sync with iTunes, and was alarmed at the possibility of losing this data.
I had just bought an iPhone forensics toolkit and was eager to try it out, so I used it to extract information from the iPhone to my drive. I probably should have read the options of the program more carefully, because the default options I chose ended up extracting each iPhone contact into a separate vCard (.vcf) file.
Apple was kind enough to replace the phone; the replacement arrived a couple of days ago. The next step was to restore the contents of the old phone. The forensic software had created separate folders for each major category of data on the phone (contacts, photos, music, etc) so it was a relatively easy task to point iTunes to these folders and sync most of the content to the new phone.
The contacts, however, were another matter. I have my own contacts set up on Outlook (this is on my Windows machine) and did not want to disrupt the existing contacts by importing my sister’s contacts into Outlook and then syncing through iTunes.
So I began to look for alternative ways to do this. One of the main problems was that each contact was in a separate file. It would have been extremely inefficient to deal with these files on an individual basis. So the first thing I did was to consolidate all the files into a single .vcf file.
I did this by issuing the following command from the DOS prompt while in the folder containing the .vcf contact files:
copy *.vcf contacts.vcf
This command combined all the vCard files into a single file, contacts.vcf. My next step was to import this file into the iPhone’s contacts. To do that, I took advantage of Google’s implementation of Microsoft® Exchange ActiveSync®.
First, I imported contacts.vcf into my sister’s Gmail account. Next I set up an Exchange account on the iPhone and pointed it to my sister’s Gmail account. This automatically synced all contacts to the iPhone.
In order to setup a Google Exchange account on iPhone, you need to do the following. First, you need to go to the “Mail, Contacts, Calendars” page on your phone’s settings and choose “Add Account”. Once you do that, you will be presented with the following screen:
The screen above allows you to choose the type of account to create. You should choose Microsoft Exchange rather than Gmail at this point. Choosing Gmail will not allow you to take advantage of the contacts syncing feature. Once you choose Microsoft Exchange, you should be presented with a screen to enter your account information. You should enter your full Gmail address in both the email and username fields.
Once you have done that and entered your password, press next (on the upper right corner of the screen) and your phone will try to verify your account. The screenshot below shows the verification phase with a fictitious email@example.com account.
Next, you will be presented with another screen to entered the name of your server. You should enter m.google.com in the server name field and press next, again in the upper right corner of your screen, to verify your account. Below is a screenshot of the verification phase.
If everything works well, you should now get a screen giving you the option of syncing mail, contacts and calendars. I enabled all options, but you can turn off the other options if you only want to use this account to sync contacts. That’s it, your phone will now sync with your Gmail contacts.
Of course, this entire hassle could have been avoided if the phone was properly backed-up using iTunes. If a backup had existed, a simple restore from backup would have solved the entire problem. But if you ever find yourself in the situation of wanting to import vCard contacts to your iPhone without going through Outlook, or other supported mail clients, you can always use Gmail to sync your contacts.