Getting to your iCloud calendar from iCal 4 (OSX10.6) or a CalDAV client
// October 13th, 2011 // Rambling, tech
UPDATED 10/15/11 with new instructions!
I work in an environment where all the machines are tied to a single sign-on system and all the users, be they Mac, PC or Linux, have their home directories mounted from a server at login. Right now, OSX Lion won’t work in that environment, so all our Macs are running 10.6 or 10.5.8.
But what if I want to use my iCloud calendar from work via iCal (or another CalDAV capable client**)? It’s pretty damned easy, actually, I’m happy to say.
Maybe this is published somewhere, maybe not. But I figure a couple of my peeps might benefit from me posting this up. So here goes.
- Get your calendar set up and up to date in iCloud first. Don’t monkey with doing that after the fact.
- It just got easier. Skip to step 10 and ignore the steps below that says [SKIP]
- [SKIP] Open icloud.com in a web browser and go to your calendars. Click on the circular ‘wireless’ icon to the right of the name of the calendar you want to use. The calendar you want to use must be shared.
- [SKIP] Note the name of the server right after webcal:// (example: p02-www.icloud.com)
- Open iCal 3. (I’ll be referring to iCal from here on, I can’t say for sure how other CalDAV clients will respond).
- In iCal, go to Preferences -> Accounts and click the add account button (+)
- Select CalDAV as the account type.
- Enter your iCloud username (for instance, steve@mac.com) and password
- [SKIP] For server address you need to slightly modify that server name you jotted down in step 3
If the server was p02-www.icloud.com, you would replace www with caldav and enter p02-caldav.icloud.com - For the server address simply enter “caldav.icloud.com” (I don’t know when this started working, but it does.)
- Click create. If presented with a choice of two possible servers, choose the one that says caldav.icloud.com, not cal.me.com — IF YOU GET AN ACCESS NOT PERMITTED ERROR then you’ll need to use the greyed out instructions instead.
- Live large. Your now have your iCloud calendar and reminders in iCal. You might want to change how it refreshes, if you’re like me and want control over that. Push may not work as well in iCal 3. Otherwise, it’s a full CalDAV implementation; add, delete, modify, etc.
** Update: I haven’t been able to get it working in Lightning/Sunbird yet. But it’s most likely a matter of forming the URI correctly. It should be somehting along the lines of:
https://pXX-caldav.icloud.com:443/[unique ID]/principal/
or some variation thereof. I’ll try to work on this more tomorrow.
Update 2: It appears they’re also using CardDAV for contacts (hooray for standards!). The path for that would start https://pXX-contacts.icloud.com/[unique ID]/carddavhome (Thanks MacRumors forums!)
As of 10/15 6:30pm EDT I have NOT been able to get this working in Address Book 5. If you want to take a stab at it, I do know that Address Book 6 uses a URI like:
https://[username]%40mac.com@pXX-contacts.icloud.com:443/[unique ID#]/carddavhome/card/[long srting].vcf
(The %40
being necessary as you can’t have two @ in there but need to include an email address as a username.)
Update 3: So they’re not using a SRV record to do it as far as I can tell (but they are using Akamai so there’s at least one layer of abstraction). Next…
Yours in nerdery,
Maggie
Can you post a screenshot of step 3? When I click on the wireless symbol, it doesn’t show me the address anywhere? Perhaps it used to be there in the beta?
Sorry. I’m at home now or I’d do a screen grab. :/
It will only show if the calendar is shared. You can turn it on, get the address, then un-share it.
Or if you don’t want to expose your calendar, create a new blank calendar and share that.
The server hostname will be the same on any calendars you create.
Or… you can just start trying servers p01-caldav.icloud.com, p02-caldav.icloud.com, p03-caldav.icloud.com, etc.
If you didn’t get it working, good news. There’s an even easier way. See updated post for simpler instructions.
Thx!!! it works great for me!! Thx a million!!
Glad to hear. :)
Hi, thanks for the infos.
Do you think is possible to add an “iCloud Calendar” also in iCal 3 (Mac OS X 10.5)?
I tries many times, with several combos, but it doesn’t work :(
I don’t think that is too different to add a “webcal”.
Thanks!
It may be possible, but iCal 3 doesn’t seem to do auto discovery and seems to be a bit weird about SSL URIs.
My guess is that once we figure out the full path that’s needed for clients like Lightning and Sunbird, the same can be applied to iCal 3.
But I wasn’t able to sort that out yet. :/
Thank you!
I don’t understand how to get the full path (I miss the “unique ID”) :(
To get the unique ID to use with other CalDAV clients [which may or may not work at this point], you need to get this working on iCal 3 first as shown here ore get it from a Lion machine with iCloud set up already.
From iCal3/OSX 10.6
Once you have it set up on iCal 3, you go to Preferences -> Accounts and look at the Server Setings tab for the new CalDAV entry you just set up. In there you’ll see a server path that looks like /12345678/principal (where 12345678 will instead be a unique ID number for your account).
From Lion with iCloud configured
Look in
~/Library/Application Support/AddressBook/Sources/[your iCloud account]/Configuration.plist\
Thanks for the work!
I read your updated guide, but iCal3 (Leopard 10.5.8) still doesn’t work :(
I have the server (p02), obviously my account ID and pw, but ii doesn’t find the “account infos”.
Sigh T_T
DONE!!!!!
THX!!!!!
I LOVE YOU!
Hi Cam – can you tell me how you eventually set it up on Leopard?
I keep getting “Connection to the server p03-caldav.icloud.com was refused”.
I have tried lots of different things and it never seems to work.
Any ideas?
Work for a few minutes, then Google deleted the subscription with a cryptic message about the URL. Any ideas?
I haven’t tried it from Google at all. Sorry. I general sync ‘from’ Google, not to it. My only suggestion is to remove it in Gcal and re-add it and see if that helps.
hi,
I followed your steps from 1 through 9 and i keep encountering an error message that reads: “The calendar https://www.google.com/calendar/dav//user/ was not found on the server. Make sure the URL is correct.”
i’m on mac osx 10.6.8, ical4.0.4 and ios5.
1. i create a new account on ical using the server address p02-caldav.icloud.com.
2. i go to server settings on my new account and the server address has been automatically configured to http://www.google.com, and server path to /calendar/dav//user/. (idk if this what i should be seeing — should the server address be google.com?)
3. once i finish creating a new account, I try to sync ical via icloud.. and the error message pops up!
i dont know what im doing wrong and im getting so confused/frustrated… please help! :(
I have no idea why you have google.com in the URL. That’s bizarre.
Make sure you don’t still have a Google subscription in your iCal -> Preferences accounts. Sorry I can’t be of help. That’s just… bizarre.
PS – I just posted new simpler steps. Give that a try as well.
I’m running into the same problem; somehow, iCloud seems to “know” about my Google account (which I never used for anything calendar-wise) and is defaulting to that account instead. On one attempt to set it up on my work computer, it gave me the option to use the icloud server or the Gmail server. I picked the iCloud server and it has worked perfectly so far. But I haven’t figured out what caused the option to be given to me on that one attempt, so I still haven’t got it set up on my home computer.
After further tinkering, I found a kludge that may or may not have done the trick. My Google password was the same as my Apple ID password; I temporarily changed my Google password, which (I think) forced iCloud to use the other account it had a record of. If you’re using the same password for both Apple and Google, and your Apple ID is a Gmail address, try changing one password or the other and see if that does the trick.
Thanks so much, was able to get iCal working seamlessly.
I have had no luck with Snow Leopard’s address book — have you gotten it to work or know anyone who has?
I haven’t tried the address book yet. If I get a chance I will and I’ll post here what happens or if I get it working (and how).
Hi Maggie
Tx a lot: it works fine but just a question: do you have to leave your agenda public in iCloud? Can people look up this agenda if they don’t know the url? eg they search my name on the web + agenda + iCloud and would be able to see my ‘public’ agenda?
in this case i don’t like it too much for privacy reasons off course.
what do you think
Actually, although I haven’t confirmed it since I leave my work calendar public, you should be able to turn off sharing of the calendar once it’s set up. It shouldn’t be necessary to keep it shared once you’ve set it up using your authenticated credentials as that was just a quick way to get the server details.
PS – I just posted even easier instructions which don’t require knowing the server path if you want to try unsharing your calendar and then connecting to it.
Many thanks for this – just what I was looking for. Gives me some iCloud functionality on SL.
I’ve just upgraded to iOS 5 but don’t want to run Lion on my Mac. I’m just not happy with the way the OS X is going and am very happy with Snow Leopard.
Glad I could help. :)
Have you been able to get Address Book to actually connect to iCloud in Snow Leopard? I’ve tried your link style and have been unable to get it to connect. Tells me it can’t find the user & pass, despite them being correct. I can get iCal to work. However, iCal has to be set to check for changes as iCloud doesn’t seem to push changes to Snow Leopard (but at least it can sync and push changes to iCloud).
Not yet. If and when I get a chance to try it, I’ll post a comment here to let you know.
Turns out that my iCloud server address for sharing is p07. However, I messed around with iCal and put in p01, and now push capability works on all my Snow Leopard iCal computers with iCloud and the 4s.
Now if I could get Address Book linked up in a similar fashion, I’ll be in data heaven.
When you say unique ID, do you mean your MobileMe email address?
No, it’s a unique number tied to your iCal account.
To get the unique ID to use with other CalDAV clients [which may or may not work at this point], you need to get this working on iCal 3 first as shown here or get it from a Lion machine with iCloud set up already.
From iCal3/OSX 10.6
Once you have it set up on iCal 3, you go to Preferences -> Accounts and look at the Server Setings tab for the new CalDAV entry you just set up. In there you’ll see a server path that looks like /12345678/principal (where 12345678 will instead be a unique ID number for your account).
From Lion with iCloud configured
Look in
~/Library/Application Support/AddressBook/Sources/[your iCloud account]/Configuration.plist\
Great post…but I too am stuck at the server path problem, and I don’t have access to a Lion machine. Is there no other way to find out our unique ID number? Thanks.
Hi maggie,
Strange thing happened: it all worked fine but now if i put in an appointment on the mac, it doesn’t sync to the cloud or the ipad/iphone. Whatever i put on the ipad or iphone comes to the cloud and mac.
any explanation why the mac doesn’t sync any more to the cloud? It worked fine this morning…
thanks a lot
Try changing the sync (“Refresh calendar” in Preferences -> Accounts ) from push to ‘every 5 minutes’ and see if that does it. Also, try doing a ‘refresh all’ in iCal.
PS – Try removing the calendar and using the new simpler instructions I just posted.
I’m getting the following after following your instructions:
Access to account ?? is not permitted.
The server responded:
?HTTP/1.1 403 Forbidden?
to operation CalDAVAccountRefreshQueueableOperation.
should clarify that the ?? above is because I removed my email address. The other two questions before and after the HTTP line just appeared there.
I was able to reproduce the error on a machine. Sadly, the only way around it was to go back and use the old instructions. :/
Thank you so much for providing this information.
I can continue to use Snow Leopard for the present.
Not so easy to make CardDav working. Tried to manually edit the Subscription.plist file but no way.
Have you figured out how to get the calendar working on lightning? I’ve tried so many different combinations. The most recent address I have used is:
https://p01-caldav.icloud.com:8443/calendars/users/myuser/calendar
and
https://p01-caldav.icloud.com:8443/users/myuserid/calendar
and
https://p01-caldav.icloud.com:8443/myuserid/principal
etc… I’ve tried it all. I saw that you have 443 as the port… other websites suggest 8443
After I accept, it takes about 30 seconds to say that it could not connect. That tells me that the server is probably correct.
by the way, I got it working with ical on my mac (thanks) but I have to use PC at work and so I want to figure it out with thunderbird.
I used 443 as that’s what iCal is using. Port 8443 is the alternate CardDAV port, but I don’t see any evidence that they’re using it.
Let me know if you have success!
For adding individal calendard in Lightning, I’d vote for
https://pXX-caldav.icloud.com/{myuserid}/calendars/{myuserid}/
That uses the default port 443 and it almost works. Well, I don’t get any events on Lightning, but its error console shows a lot of warnings with working urls for individual events on that calendar. So authentication works and Lightning gets the events, but something else fails.
with port 443, I get the following error:
Warning: There has been an error reading data for calendar: cl. However, this error is believed to be minor, so the program will attempt to continue. Error code: DAV_NOT_DAV. Description: The resource at https://p01-caldav.icloud.com/userid/calendars/userid/ is either not a DAV collection or not available
and for port 8443, I get
Warning: There has been an error reading data for calendar: j3. However, this error is believed to be minor, so the program will attempt to continue. Error code: DAV_NOT_DAV. Description: The resource at https://p01-caldav.icloud.com:8443/calendars/users/userid/Home is either not a DAV collection or not available
Many thanks ! Had to perform anhybrid between old and new method. Works fine !
with port 443, I get the following error:
Warning: There has been an error reading data for calendar: cl. However, this error is believed to be minor, so the program will attempt to continue. Error code: DAV_NOT_DAV. Description: The resource at https://p01-caldav.icloud.com/userid/calendars/userid/ is either not a DAV collection or not available
and for port 8443, I get
Warning: There has been an error reading data for calendar: j3. However, this error is believed to be minor, so the program will attempt to continue. Error code: DAV_NOT_DAV. Description: The resource at https://p01-caldav.icloud.com:8443/calendars/users/userid/Home is either not a DAV collection or not available
Has anybody found a way to get the iCloud calendar(s) on 10.5.8 yet…?
I’ve experimented on a 10.6 Mac, and all is fine with the above methods, but 10.5 doesn’t want to play it seems….??
I found a work around… If you go into iCal on a newer machine or to iCal through icloud.com, you can publish your calendars. Unfortunately, it has to be a public publish. Then, from your 10.5.8 machine iCal, you can subscribe to your own calendar and set it to refresh every 5 minutes.
Thank you, this helped a ton. Worked out great for me. Had to use the grayed out steps though!
So the calender and the reminders seem to work for most people with at least 10.6. So does me.com imap with the notes. Only thing missing for me atm are contacts. How much I’d love to sync those. Any news on that front, do they work for anybody with Snow Leopard, at all?
And if so, what’s the [long string]? Thanks for everything Maggie!
I was able to get the caldav to work with Sunbird, I think there is a bug in the current version of Lightning, so we’ll likely have to wait for the next version for access to iCloud calendars. However, here are the steps for getting your calendars working in Sunbird. FYI, I’m assuming you have calendars successfully set up in iCal.
First step, determine the pXX for your iCloud account:
Navigate to your Home Folder->Library->Calendars in Finder (I’m using snow leopard, not Lion, so my Library folder in my home folder isn’t hidden, which FYI is really annoying Lion)
In this list you’ll notice a folder named with very long string of numbers ending in .caldav, navigate to this folder.
In this folder you’ll notice folders names by a string of numbers and letters, which represents each of your iCloud calendars, for instance I have three calendars: home, work, and reminders so I have three corresponding folders names with long strings of numbers and letters. We can ignore those for now. To determine your pXX number open the Info.plist file, so an option-f and search for https:// the first result should give you your server number, which has the form:
https://pXX-caldav.icloud.com
Second step, determine the caldav address for each folder:
Now you have to open the info.plist file for each folder associated with you individual iCloud calendars (long folder name made of letters and numbers referred to earlier).
On line twelve, sandwiched between will be something like:
/123456789/calendars/ABCD-1-2-EFGH345I-6789-123J-4567-89KLM1N2OP3Q/
This is what you put at after the caldav server address.
So, in Subird create a new network calendar and add the following into the location field:
https://pXX-caldav.icloud.com/123456789/calendars/ABCD-1-2-EFGH345I-6789-123J-4567-89KLM1N2OP3Q/
for each calendar on your iCloud account. A pain, but hey it works.
Alternatively, to get the calendar addresses you can right click on each calendar and click Get Info in iCal 4.0, avoiding having to root around in the info.plist files…
Hoory,!
Finally I got this work!
The problem was causing by Address Book 5, I have mad the instruction here ( 12 steps)
http://www.hsiaoi.com/blog/?p=512
Hooray!
It works now in Snow Leopard 10.6 + Address Book 5 + iCloud
The problem is causing by Address Book 5 login issue
Here is instruction (12 steps)
http://www.hsiaoi.com/blog/?p=512
Here is how contacts work in Snow Leopard!!
in server enter “https://p02-contacts.icloud.com:443/unique ID/principal” (Unique ID you have to find yourself, someone explained it already)
And here is the tricky part!!
in username enter your full apple ID but without the @, instead write %40 and with your password, like this:
username%40mail.com:password
and repeat your password in the password field and voila, contacts syncing!!
enjoy
Cris
Hi,
Thank you for your work. It worked for me!!! Both Calendar and Contacts though now It seems address book in the mac is duplicating the contacts (in the iCloud agenda of my Snow Leopard mac) In the cloud I have 1089 contacts and in the iCloud agenda of my mac already 1879 and it seems each time it syncs the number goes higher. It is not that I have duplicates because I have mac contacts and icloud contacts in my macbook (I know they are duplicated, but when I select the only iCloud address book that the number of contacts grows and grows, at least it makes no changes in the rest of the iCloud ecosystem. Anyone with the same problem?
Having the same problem of duplicating contacts. If I look or edit on icloud site, the # of contacts on my mac just keeps growing. Every edit seems to make multiple duplicates appear on my mac icloud list in Address book. Not sure this is ready for prime time!
haven’t checked what is happening on iPhone4.
I’m having the same issue. Address Book will “sync” with iCloud but every time something changes in a contact anywhere in the cloud – it will duplicate every contact.
I finally had to disable it when it got to 9 duplicates for every contact I had. It was bogging down my computer and making a mess. Hopefully someone comes up with the answer to this.
Having the duplicate-problem too, but only some contacts are duplicating. I thought it might be an issue of groups, but even contacts in the same group don´t behave the same way. Could not find any systematic factor….
This took me days to finally get to work based on a suggestion in your feed only to find that with in minutes my contacts on the Snow Leopard mac were growing. Seemed random as to which contacts were duplicated as I made no changes on either iCloud or the Lion machine. Somehow the contacts are much more difficult to configure than the calendar which I added in one step.
Apple could solve this by releasing 10.6.9 and making all of us happy who had already paid for MobileMe!
I look forward to a solution posted here.
I am convinced that the presences file is somehow connected as it looks very different than the one on my Lion machine. No idea how to change it so that it does not duplicate.
I finally got the Address Book thing sorted. I posted what I did here: http://forums.macrumors.com/showthread.php?p=13805131#post13805131
Essentially, I figured out which ones were duplicating and came up with what appears to be the “right” way to delete them and get it all to work. It took about an hour to sort through all my contacts (over 1,000). But now it’s working on my iPhone, iCloud, and both of my Snow Leopard computers.