It continually amazes me that some of the basic necessities of organization and productivity have not been given enough attention by the major players in application and operating system development. Looking for solutions, many people are forced to pay for utilities which bring up the slack.

While I support many small developers for the great work that they do, I’ll take a free solution if I can get it. I also like wherever possible to solve problems using as few variables as possible. So when my subscription to Spanning Sync recently expired, I revisited the problem of syncing calendars between iCal, Google, and my iPhone using ‘built-in’ features.

The reason Google is part of the equation is so my partner and I can share calendars without publishing them from iCal. In my opinion any implementation of calendars should provide both read and read/write sharing, publicly and privately. iCal only allows you to publish publicly, though I suspect more features are possible using their paid MobileMe service.

Though Google’s implementation of CalDAV leaves a lot to be desired, I found that with features of the new iPhone OS the solution, though still ugly, has improved. The main problem with Google CalDAV is that on both iPhone and iCal, you can’t see all your calendars using only one account. That is, you should be able to create one CalDAV connection using your google credentials and connect to all the calendars (owned, shared, and subscribed) that you can see through the Google Calendars web interface using the iPhone or iCal as clients. Although I have not tried it, I’ve read that Yahoo!’s implementation works in a more intuitive manner. The solution is you have to create a new CalDAV account for each Google calendar you want to connect to.

I recommend this post for instructions.

Reading through the comments for this post I saw what I thought to be an even better way: rather than syncing calendar data from iCal to the iPhone via iTunes, create the CalDAV accounts directly on the iPhone. This way, any calendar items created on any of the three platforms (Google, iPhone, iCal) will be synced with the others within a matter of minutes. No need to plug in the phone and sync with iTunes.

Be sure you have the latest version of the iPhone OS. I don’t believe this feature was available until recently.

Create a text list of the google calendar addresses you’ll need and email them to yourself. Then open the email on your phone and copy one address at a time. Then go to

Settings > Mail, Contacts, Calendars > Add Account… > Other > Add CalDAV Account

and paste the address in the server field. I found that the form replaces the address with; this was confusing at first but after testing I found that it still works. Enter in your google login and password for each account and name the calendar.

Now whenever you add a calendar item to your iPhone it will be immediately added to Google (assuming network/cellular connectivity), and iCal will sync with Google at regular intervals set in iCal preferences. During testing you can see your updates immediately in iCal using the menu item Calendar > Refresh All.

This appears to work as I’d like it to. It’s free, allows syncing between the phone, web, and desktop clients, and allows sharing of calendars via Google calendar sharing features.

Next I’d like to figure out how to push the Birthdays calendar, which is created in iCal based on data from Address Book, out to Google. In the meantime, I’ll sync Birthdays with the iPhone via iTunes.

Update: I started getting errors in iCal. The issue seems to be that by creating the CalDAV accounts in iCal using the Google method as opposed to the CalDAV method, the URL was being created wrong. Looks like an iCal bug. What seems to have resolved the issue is deleting the CalDAV accounts and recreating them using the CalDAV method.