iPhone 3G Sync with Google Contacts

I've been through a number of cell phones in the past few months, and when my most recent Motorola RAZR gave up the ghost earlier this week, I decided it was time to move on to something different. That something different is the iPhone 3G.

There's a lot to say about the iPhone. It really is a fantastic piece of communications equipment. I've had Blackberrys, I've used Windows Mobile phones. But the iPhone really is something else entirely. It's in a class of its own.

However, I was having problems getting my Google Contacts to sync properly. After much fruitless searching online and bashing my head against the wall, I've solved the problem so I thought I would share it publicly in case others have similar issues.

With the latest release of iTunes, it's possible to sync the iPhone with Google Contacts. As many others have noted, you cannot specify a specific set of contacts - it's all or nothing. But that didn't bother me. I have not used Google contacts before, so I set about cleaning up and organizing all of the contacts in my Google account and adding in entries for everyone I had on my previous cell phone. Luckily I had made a back up in Mobile Phone Tools, but it was a bit of tedious copying and pasting into Google.

I did my first sync and everything seemed to work as expected. I tried updating some contacts in Google and sure enough, they synched to the iPhone. However, when I would edit certain contacts on the iPhone the changes would not sync back to Google. I searched all of the iPhone forums, the Apple support site, reviewed the Apple Knowledge Base, but all to no avail. My contacts seemed to be syncing in only one direction.

It turns out that the reason for this is that Google uses the e-mail address as the primary key for its database. So it determines that a contact has changed based upon the e-mail address. Unfortunately I didn't have e-mail addresses entered for many of my previous cell phone contacts. Either I didn't have their e-mail address, or in many cases I did have it but I had neglected to enter it into the Google Contacts system.

For those contacts where I did have their e-mail address, I went back into Google and updated the contacts to include an e-mail address. After doing this, my sync is working as expected bidirectionally. For those contacts who do not have e-mail addresses, I'll just have to keep on top of the changes manually and review my Google Contacts list to ensure that changes are updating appropriately and that I am not creating duplicate entries in my syncing. Since the number of people who I know without e-mail addresses is fairly low, that does not pose a major inconvenience for me.

The moral of the story is: whatever other information you enter into Google Contacts about a person, don't leave out their e-mail address!