Sync iCloud Contacts/Calendar with Android
The bane of using an Android device having come from iOS is largely the inability to easily transfer your contacts and calendar entries over.
A cursory Google search doesn’t really seem to have any solutions to this particular problem either because iOS users are contented with their devices and Android users would probably never use iCloud over Google’s own cloud offerings.
Google lets you get access to your stuff via Microsoft’s Exchange Activesync. iCloud seems like largely a blackbox that doesn’t seem to have any public endpoints. However, a quick look at Apple’s history shows time and time again, the usage of open standards or at least proposed standards.
iCloud contacts are largely coordinated through CardDav, while calendar is CalDav, both of which are open standards. So at the end of the day, all you need is a system to pull data from those sources and push them to either your device or a service that can push them to your device.
In this case, I found CalDav-Sync and CardDav-Sync. These are basically Android applications implemented as Sync conduits for Android’s account feature. The paid version is not that expensive for what they do so buy it.
Having these available is still one part of the equation. Getting access to your data is the other. iCloud stores account information in
~/Library/Application Support/AddressBook and
For your contacts, look in the
~/Library/Application Support/AddressBook/Sources directory and hunt for
Configuration.plist files. There should be a few if you’ve previously added multiple sources. What you are looking for is a URL in the rough form of
https://<icloud user name>@pXX-contacts.icloud.com… what you are interested is the server
pXX-contacts.icloud.com where XX is a number. That is basically your CardDav server you need to connect to. The username and password is your iCloud login respectively.
Similary for calendar entries, look in the different directories under
~/Library/Calendars looking for an
Info.plist. This time search for a string in the rough form of
https://pXX-caldav.icloud.com… The server for CalDav is basically
pXX-caldav.icloud.com where XX is a number. Username and password is your iCloud login.
Here are a couple of screenshots for CardDav-Sync and CalDav-Sync.
Its that simple!
Coincidentally, this is also the way you can add Calendars from other Google accounts without syncing the entire account. Left as an exercise to the reader to figure out.
UPDATE: Thanks to Marten (dude who wrote the 2 sync apps), you can actually just use caldav.icloud.com for calendars and contacts.icloud.com for contacts.