Words (old)‎ > ‎

Sync contacts, calendars, mail on several macs, iPhone - automatically and (almost) for free using Google.

posted Jul 8, 2009, 4:29 AM by Matteo Risoldi   [ updated Jul 9, 2009, 5:54 AM ]
I have one mac at work, two at home and I recently got an iPhone 3GS. After I bought the iPhone one thing was immediately clear: I had to find a way in which I could sync my calendars, mail and contacts between all my computers and my iPhone.
The cable sync was just not enough. I generally charge and sync the iPhone with the Mac Mini at home, as this is where I keep my music and videos. However, most of the modifications to calendars and contacts are rather done on the MacBook Pro at work, or directly on the phone.
Apple provides the Mobile Me service that can take care of this, but frankly its price is not something I am willing to fan out - I am not interested in its other services, and a hundred bucks per year to sync seems a bit too much.

After a little googling and experimenting, I found a combination that is working 100% well for me at the moment. The total cost of this solution is 20$ per year, or a one time fee of 60$, depending on the license you choose for one of the softwares involved.

Before giving you the details, let me explain exactly what I need to synchronize.
I have an Address Book kept on my work MacBook Pro. These are all my contacts.
I have several calendars on Google Calendars. Two of these belong to my personal account. The others belong to an account I share with my colleagues, on which everyone has read/write access. Until now, I have been synchronizing these calendars on my macs using CalDav.
I also have two IMAP email accounts, one at my workplace and one on GMail.

I want all of this data to be available indifferently on any of my macs and my iPhone. I also want to be able to modify data on any of these devices and have the modifications sent to all other devices. Finally, for the iPhone I want the synchronization to be wireless.

I am going to explain how to use Google as a server to synchronize everything in the smoothest way.

1. What you need
First, you have to create a Google account. Go to www.gmail.com and create an account. With this same login you will not only obtain a GMail address, but will also be able to use Google Calendars and Google Contacts.
Then, you will need one piece of software called SpanningSync. This is a synching utility which is especially efficient, and integrates well with your mac and Google. The license is 25$ per year, or 65$ as a one time fee, but you can have a 5$ reduction on either license if you use this link to buy it. It is the only piece of software that you will have to pay, and you can try it for free for a couple of weeks to be sure it is worth it. I did, and after 15 days I found it totally worth to shell out the price for a license.

2. Configuring your macs - Mail
Normally, synchronizing email is the easiest part, at least if you use IMAP like me. In fact, with IMAP servers the messages stay on the server even after you download them.
So fire up your Mail application and add the IMAP accounts for your addresses. If your provider does not provide IMAP mail access, you might use POP - but in this case you have to tell Mail to leave the messages on the server after downloading them (you have this choice in the account preferences).

3. Configuring your macs - Calendars

We will suppose that you have already set up your calendars on Google Calendars (refer to their help about how to do this). Say that you create two calendars; one is the main calendar you get when opening the Google Calendar account, the other is one you added yourself. Let's call this calendars "main" and "added" respectively.

Now select "Settings" in Google Calendar (top right), then click "Calendars", and then the name of the "main" calendar. Click "Share this calendar" and "Make this calendar public". Click "Save". Now repeat these steps for the "added" calendar. Don't forget to click "Save".

Open iCal on your mac. Go to the preferences, click "Accounts" and add an account. Name it as you want, for example "main". Put your GMail user and password, then click the small triangle next to the "Server Options". In the URL field put the following:

        https://www.google.com/calendar/dav/yourusername@gmail.com/user

where you should substitute your own username in place of "yourusername". Click OK.

Now add another account. Call it "added". Again put your GMail user and password, and click the small triangle. In the URL field you must put something like:

        https://www.google.com/calendar/dav/calendarid@group.calendar.google.com/user

where you should substitute the ID of the "added" calendar in place of "calendarid". To retrieve this ID, go to Google Calendars again, click Settings -> Calendars -> Added. Look towards the bottom of the page. There should be a "Calendar address" section, with a few buttons and a message saying "Calendar ID:" followed by a long string of letters and numbers. This is the ID of this calendar, which you should put in the URL above.

If you have more calendars, you can repeat the above steps over and over. Remeber the calendar ID will change for each calendar.

You can now close the preferences. iCal will from now on synchronize automatically with your calendars. If you repeat these operations on all of your macs, you will be able to see and modify any calendar from any of your machines.

4. Configuring your macs - Contacts
First thing, backup your OS X address book. You're never safe enough. To do that open Address Book and click File -> Export -> Address Book archive. Keep the exported file safe.
Install the SpanningSync application and start it. It will ask you to provide your Google credentials. Go to its preferences (in the System Preferences panel), enter the Calendars tab and uncheck the "sync calendars" box (iCal can take care of that directly). Then enter the Contacts box and check "sync contacts". Choose what contacts to sync (All Contacts or only some groups), then click "Sync now". This will perform a first synchronization with Google contacts. If you already had contacts in Google Contact, there is a chance that you will have duplicates. Be patient and delete them by hand one by one. You might have to do this more than once, but generally this only happens the first 1 or 2 syncs.
One thing that gave me a lot of trouble, as I did not know it, is the following: Google Contacts does not support the "other" tag for numbers and addresses. If you have a number for a contact marked as "other", it will not get synced. So, be sure that all your contacts' details are tagged as "Home" or "Work".
Another annoying feature is that the iPhone does not support multiple mobile numbers for a single contact. This means that, since we're going to sync with the iPhone, you will have to avoid having multiple mobiles in any contact. If a contact has several mobiles, either tag them differently or split the contact in several contacts having only one mobile each.
If everything went well, your contacts should be successfully replicated on Google Contacts. You can verify that by going to http://www.google.com/contacts and browsing them. If you see some details are missing, go back to your address book, see if there are tag problems, and re-sync.

Finally, install SpanningSync on all macs you want to sync, provide the same Google Credentials and configure it as we said before. This should replicate your contacts everywhere. Modification on any mac will be synched with all other machines.

5. Configuring the iPhone - Mail
Here also, like on macs, the configuration is easy: just go to the settings, email, and enter the IMAP or POP parameters your provider gave you.

6. Configuring the iPhone - Calendars
Go to settings, email-contacts-calendars, and click "add account". Then click "other", and then "Add CalDAV account".
Using the same calendar URLs as before, paste them in the "server" field. After pasting the field will only display "https://www.google.com" - this is normal, the rest of the URL is actually memorized. Also put here your user and password from Google, and give it a meaningful description.
To add several calendars, repeat this procedure for each calendar, using the appropriate URL.
Now open the Calendar in your iPhone. If you have a data connection available, you should see your calendars pop up.

7. Configuring iPhone - Contacts
Google put a detailed explanation of this here:
   http://www.google.com/support/mobile/bin/answer.py?answer=138740&topic=14252
I just want to add that after adding the Exchange account, you should click on the account name to see its settings, and deactivate mail and calendars, leaving only Contacts active.
Here also it could happen that you have a couple of sync problems the first times you use it. Be patient and fix them as you find them. After a few syncs problems will smooth out.

Be careful of one thing. Depending on how the iPhone is configured, it could be using Push, or it could be updating data every hour/30 minutes/15 minutes. If you have strict limits on your data traffic, or if you want to spare battery life, you'd better set this to "Manually" in settings, email-contacts-calendars.

That is all.
Now it doesn't matter whether you modify your mail, contacts or calendar on your macs or your iPhone. Provided that you have a data connection available, every device will send the modifications to Google, so that every other device can receive them. This is especially good for the iPhone if you have a 3G connection - you will always be pushing your modifications to Google.

Have fun with your syncs!

PS: why don't I use Apple's Mobile Me?
Besides all of these calendar/contacts stuff, I also keep a photo gallery on Smugmug.com, which costs me about 39$ per year (unlimited space). Also, I use Amazon S3 for personal backups, which costs me about 8$ per month. One could argue that if I sum this fees, I get rather near to Mobile Me's annual cost for a 40GB upgrade (about 140$ per year). Mobile Me also offers a very nice photogallery feature, a web-accessible storage space, and all of the contacts/calendar syncing functionalities.
However, there are two issues keeping me from signing up to Mobile Me. The first is the amount of storage space. I currently have unlimited space for my photo collection (which at the moment amounts to about 20GB). I also keep about 15 GB of backups on Amazon S3. With this alone, I would be almost filling up the 40GB I can get for 140$ on Mobile Me. This leaves very little space to actually increase the amount of cloud-based backups I am making now. Also, my photo collection is constantly increasing in size, and this would rapidly pass the 40GB mark, requiring an expensive upgrade.
But even more important than this is the issue of calendars. Although for my personal calendars it could be reasonable to use Mobile Me as the synchronization hub, I cannot avoid using Google Calendars: this is what my work group is using, and I have to cope with synchronizing with it. Unfortunately, Mobile Me does not provide Google Calendar synchronization. Which means I would still be stuck with synchronizing to my computer using Spanning Sync, then synchronizing iCal to Mobile Me, and that would defeat the purpose of Mobile Me's calendar function - I might as well skip it entirely and sync my devices directly to Google.
Let's say this: if and when Apple provides at least 80 GB for 150$/year and better integration with other calendar/information management tools, then I will be happy to pay a premium for the smoothness of integration and the slickness of the gallery interface. But until then, I'm afraid I'm going to stay with Google.
Comments