PDA

View Full Version : Using iCloud for Cal/Addr Book with iOS4?




ayeying
Jun 25, 2011, 08:39 AM
So. I'm considering downgrading one of my devices back to iOS4. All of my devices are currently synced via iCloud for Address Book and Calendar events.

Now, if I downgrade one of the devices, can I still sync, via iTunes, the same information (just won't be pushed through wirelessly or 3G) or is iCloud information, exclusive to iCloud only?



hazkid
Jun 27, 2011, 11:18 PM
Set iCloud up in iOS 4/Snow Leopard as CalDav/CardDav accounts.
Contact server: https://p02-contacts.icloud.com:443/[uniqueid]/carddavhome
Calendar server: https://p02-caldav.icloud.com:443/[uniqueid]/principal

Your unique iCloud ID can be found in Lion at ~/Library/Application Support/AddressBook/Sources/[iCloud Account ID]/Configuration.plist.

I'm not sure if the uniqueid thing is actually necessary. I tried setting up my accounts without it at first and it didn't work, but your milage may vary.

uofawildcats96
Jun 28, 2011, 11:53 PM
Is there anyway that I can find my Unique ID without Lion? I am considering doing the same thing as the OP. However, I'm just an iOS developer and not a mac developer, therefore I don't have access to Lion yet, to access my ID.

Thank you.

hazkid
Jun 29, 2011, 12:02 AM
Definitely give it a try without the ID (or anything following it).
I can't confirm whether or not it will work, but I'm almost completely certain it will.

So to repeat:
CardDav: https://p02-contacts.icloud.com:443
CalDav: https://p02-caldav.icloud.com:443

uofawildcats96
Jun 29, 2011, 12:04 AM
CardDav: https://p02-contacts.icloud.com:443
CalDav: https://p02-caldav.icloud.com:443

nope, doesn't work :(

coatto87
Aug 1, 2011, 07:35 PM
Set iCloud up in iOS 4/Snow Leopard as CalDav/CardDav accounts.
Contact server: https://p02-contacts.icloud.com:443/[uniqueid]/carddavhome
Calendar server: https://p02-caldav.icloud.com:443/[uniqueid]/principal


Have you tried it on IOS4?

It doesn't work :(

EDIT: It works!!! I forgot the @me.com in username :)

k.alexander
Aug 1, 2011, 11:43 PM
Can't get this to work. Can someone give a step by step. I can login to the webapps on iCloud.com, but can't setup the iCal or AddressBook on my Snow Leopard machine.

applephysci
Aug 2, 2011, 12:27 AM
Can't get this to work. Can someone give a step by step. I can login to the webapps on iCloud.com, but can't setup the iCal or AddressBook on my Snow Leopard machine.

hazkid made this quite clear in his posts above.

k.alexander
Aug 2, 2011, 10:18 AM
hazkid made this quite clear in his posts above.

I'm saying, I can get this to work on an iOS4 device, but I can't get this to work on Snow Leopard--which is my ultimate goal. Setting up iCloud with the the servers listed in Snow Leopard gives me errors and never connects to the server, likewise I tried setting it up on a Lion machine, and there was no Sources folder at the address bellow:

~/Library/Application Support/AddressBook/Sources/[iCloud Account ID]/Configuration.plist

steinbch
Sep 3, 2011, 01:29 PM
Can anyone that has gotten this to work share what the Unique User ID looks like? Is it a set of numbers, how many, letters? Trying to see if the iCloud website calls this ID at any point when viewing the calendar.

kby
Oct 13, 2011, 03:11 AM
I haven't gotten it to work yet, but I think I know how to get the unique identifier w/o Lion if you are running iOS 5 on an iPhone. After setting up iCloud on the iPhone, back up the iPhone with iTunes, then find the files for the latest backup in ~/Library/Application Support/MobileSync/Backup/ (that directory contains more directories with unintellible strings by names, but ls -lt will show them in order of most recent and should show one with the date you just backed up). Go to the first directory and you will see a number of files, also with arbitrary string names (this needs to be done in a terminal or xterm window, btw). to the shell type:
find . -type f -exec strings \{\} ;\ | grep -i icloud

Eventually you will see a number of strings of the form:

https://[apple-id]@p07-caldav.icloud.com:443/<unique-id>/calendars/...

There will be analgous URLs for bookmarks and address book contacts.

The unique ID I find this way is a 6 digit number. My icloud authentication information is my Apple ID.

Note it's p07-caldav.icloud.com vs. p02. But I can't seem to get either to work properly yet. Partly it seems iCal wants to add /principal or something on the URL and otherwise munge it.

Does this form of unique-id match what the people that found it on Lion see?

I thought I saw with a google search that you'd be able to sync directly for snow leopard. Me, I'm using a G5 so am stuck at leopard.

ScoobyDoofus
Oct 13, 2011, 11:41 AM
I've managed to get iCloud calendars working in iCal (Snow Leopard) using the info provided above, but not contacts in Address Book.

In iCal, I just added a new CalDAV account, used my iCloud login info (full email address as username) and for the server I used (no https or anything) p02-caldav.icloud.com. It did a search of some kind, and asked me to choose between a Google account(!) and p02-caldav.icloud.com, so I picked the iCloud one and it worked!

When I went into the Server Settings for that account, it had filled in the Server Path itself with /{uniqueID}/principal/ and port was set to auto, SSL was ticked.

It syncs everything with my iPad and the web app, even the reminders.

So, I tried with the contacts too, first doing the same (just basic server info) and no luck, so I tried the full server address given above, but still no good. It also fills in some server info, but it doesn't look right, and clearly doesn't work. Annoying!

Finally, I added the calDav account again using p07 instead of p02, and it worked too, so I don't know if the number actually matters.

Piplodocus
Oct 13, 2011, 01:03 PM
Got no joy with p02-contacts or p02-caldav or with p03-xxxx as suggested on another site.

When I looked for the unique ID in my configuration.plist file as mentioned above though, I noticed mine said p04-xxx, so tried that p04-contacts.icloud.com (with no unique ID, or port number) and it worked! Same for p04-caldav.xxxx! :)

So AFAIK it's more worth checking the .plist file in lion for the p number, rather than the UID or anything else.

kby
Oct 13, 2011, 01:10 PM
Thanks for confirming that the p0n number in the server doesn't matter—I'd normally guess that, but it's nice to know.

I think there must be some update in the Snow Leopard iCal that makes it better able to connect to random CalDAV servers. Leopard iCal doesn't give you an SSL option, only Kerberos, although it knows how to use SSL if you give it an https. It also seems a little buggy if you repeatedly just try to adjust the URL; seems to give inconsistent results (although I'm not totally clear on that).

The URL iCal seems to want to substitute is something of the form

https://(server):443/principals/users/(apple-id)/ if you give it the minimum info (in my case https://(server):443 since that seems to be the only way to force SSL—letting it try to do it in the clear just to see if it works doesn't work either as iCloud wisely doesn't want to let you connect).-kby

Piplodocus
Oct 13, 2011, 01:56 PM
Thanks for confirming that the p0n number in the server doesn't matter—I'd normally guess that, but it's nice to know.

I think there must be some update in the Snow Leopard iCal that makes it better able to connect to random CalDAV servers. Leopard iCal doesn't give you an SSL option, only Kerberos, although it knows how to use SSL if you give it an https. It also seems a little buggy if you repeatedly just try to adjust the URL; seems to give inconsistent results (although I'm not totally clear on that).

The URL iCal seems to want to substitute is something of the form

https://(server):443/principals/users/(apple-id)/ if you give it the minimum info (in my case https://(server):443 since that seems to be the only way to force SSL—letting it try to do it in the clear just to see if it works doesn't work either as iCloud wisely doesn't want to let you connect).-kby
Oh! Seems quite contrary to what I saw on my iPod touch 2G. :confused: When I gave it the wrong p0n it didn't happen, even with ports and an "https:", but with the right p number I didn't need the port or to tell it it was secure. Took a little bit thinking about it but then connected up with no extra info other than the username@me.com and password!

Admittedly I didn't have a /principals/users/apple-id.... on the end and it was iOS 4, not Leopard or SL I was going for though...

kby
Oct 14, 2011, 02:56 AM
Ok, I tried things on an iPad (not iPad 2) with iOS 4, and things are much easier. I could just use caldav.icloud.com as the server and it could connect and see all the calendars. After looking, under "advanced settings", it had automagically set the "Account URL" to

https://p07-caldev.icloud.com:443/<unique-id>/principal

Unfortunately for me, Leopard's iCal doesn't do well with this as is.
It WILL accept it with a trailing "/" so the account is added, but it can't find calendars. I've tried tweaking the URL and such with various combitions involving "principal" and "calendars" but either I get a connect error or "no calendar home" error.

More to do…-kby

davekeyboardo
Oct 14, 2011, 12:46 PM
Was able to get Snow Leopard iCal working as per the post above where SL just "finds" the config. However, no luck with Address Book with any of the methods described. The error you get is "Too many HTTP redirects" after Address Book attempts to connect.

Have tried using and not using the uniqueID string... Also, there is the separate SSL checkbox and port box. I've tried enabling and disabling, but no luck there… could it be that issue and if so, does anyone have an insight as to the port number required?

Anyone get any more insights or a working method for Snow Leopard Address Book yet?

anorris
Oct 14, 2011, 01:00 PM
Easier way to find your p## server here - http://maggiemcfee.com/2011/10/13/icloudical/

Just login to iCloud and share a calendar publicly (it can be empty or a dummy, and you can unshare it immediately after). The webcal:// address will be formatted with p##-www.icloud, so use p##-caldav.icloud for your iCal server address.

Was able to get iCal functioning on my old MacBook Pro that freezes intermittently with Lion and I've put back on Snow Leopard thanks to this thread and the other site. Thanks to all of you, and I'll probably try AddressBook once I get back home, but for now it is off to work for me.

jsgreen
Oct 14, 2011, 11:06 PM
I found this on a apple support discussion thread at

https://discussions.apple.com/thread/3103493?start=15&tstart=0

After playing a bit I got iCloud calendars and contacts working on an iPhone 3g (running iOS 4.2.1)


Key part of the thread (thanks to a user named Puregeof) was:

Calendar server address :
p01-caldav.icloud.com
Port is 443 (SSL)
Advanced server string is:
p01-caldav.icloud.com:443/[unique ID}/principal

note - when I got this to work, I didn't have to enter anything in the advanced section)


Contacts server address :
p01-contacts.icloud.com


The "p01" could be different for different users - look in your ~/Library/Application Support/AddressBook/Sources/[iCloud Account ID]/Configuration.plist to find the specific server address.


I found that I had to delete a previous MobileMe account to get it working, although others in the same discussion didn't have to do that.

davekeyboardo
Oct 14, 2011, 11:35 PM
Thanks... I tried the server address mentioned for contacts and it doesn't work for me on Snow Leopard to get to my iCloud account either with the generic server address given or with the longer variants listed above with my unique numerical ID grabbed from the Plist on my Lion-based Mac that connects to iCloud. The person quoted as using an iPhone; I would have hoped that the server address would be the same, but something isn't right…

If anyone gets the recipe for Snow Leopard, look forward to hearing it...

anorris
Oct 15, 2011, 01:23 AM
If anyone gets the recipe for Snow Leopard, look forward to hearing it...Same, I've had no luck with Contacts. Luckily, I don't use Address Book too often, but was hoping to start transitioning that way as I hope to buy an iPhone in the relatively near future.

grahamperrin
Oct 19, 2011, 10:12 AM
The "p01" could be different for different users - look in your ~/Library/Application Support/AddressBook/Sources/[iCloud Account ID]/Configuration.plist to find the specific server address.

Probably best to use simply contacts.icloud.com

without any p…- prefix

johnnyboyvzw
Oct 20, 2011, 09:00 AM
I haven't gotten it to work yet, but I think I know how to get the unique identifier w/o Lion if you are running iOS 5 on an iPhone. After setting up iCloud on the iPhone, back up the iPhone with iTunes, then find the files for the latest backup in ~/Library/Application Support/MobileSync/Backup/ (that directory contains more directories with unintellible strings by names, but ls -lt will show them in order of most recent and should show one with the date you just backed up). Go to the first directory and you will see a number of files, also with arbitrary string names (this needs to be done in a terminal or xterm window, btw). to the shell type:
find . -type f -exec strings \{\} ;\ | grep -i icloud

Eventually you will see a number of strings of the form:

https://[apple-id]@p07-caldav.icloud.com:443/<unique-id>/calendars/...

There will be analgous URLs for bookmarks and address book contacts.

The unique ID I find this way is a 6 digit number. My icloud authentication information is my Apple ID.

Note it's p07-caldav.icloud.com vs. p02. But I can't seem to get either to work properly yet. Partly it seems iCal wants to add /principal or something on the URL and otherwise munge it.

Does this form of unique-id match what the people that found it on Lion see?

I thought I saw with a google search that you'd be able to sync directly for snow leopard. Me, I'm using a G5 so am stuck at leopard.

Your terminal command came back with a syntax error. Would you mind correcting it?


Probably best to use simply contacts.icloud.com

without any p…- prefix


Also not working. Has anyone had any success yet with iCloud contacts and Address Book under Snow Leopard?

mrhud
Oct 29, 2011, 07:22 AM
Just saw this blog posting this morning to sync Address Book in Snow Leopard with iCloud

http://www.hsiaoi.com/blog/?p=512

I'm not too sure about it though, in terms of trust.

richlin71
Oct 29, 2011, 06:54 PM
didn't work for me

fineartdavid
Nov 4, 2011, 04:36 PM
It certainly not ideal, but when I turned off SSL my contacts just synced to my iPhone 3G.

I just used the basic settings to add a cardDav account

server: contacts.icloud.com
username: iCloud email address
password: iCloud password.

Nothing was happening, so I turned off SSL and suddenly my address book started to fill with names.

jwit
Nov 6, 2011, 09:32 AM
Thanks everyone for your instructions. I finally got my iPhone 3G set up to sync with my iCloud calendars on my MacBook and iPad 2 running iOS 5.

What does not work yet, is syncing of subscription calendars. My iPad and Mac do sync subscribed calendars via iCloud (even though they don't show up on iCloud.com), but my iPhone does not display any of the calendars I've already subscribed to. Any suggestions on how to solve this?