Finally! Sync your Address CardDav in OSX 10.6 Snow Leopard

Discussion in 'Apple Music, Apple Pay, iCloud, Apple Services' started by bm2amb, Oct 28, 2011.

  1. macrumors newbie

    Joined:
    Mar 18, 2009
    #1
    Hooray, Finally I can sync my address book 5 (osx snow leopard) with iCloud

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

    1. Create an Account in Address Book 5 with CardDav Setting

    Username: yourname@xxxx.com
    Password: password
    Server: pxx-contacts.iclould.com

    It doesn’t really matter what you entered, we are going to change from Configuration.plist

    2. Close Address (Apple Key + Q)

    3. Open Terminal

    4. cd Library/Application\ Support/AddressBook/Sources

    5. ls -l (search for the latest updated directory)

    6. cd [the directory name]

    7. nano Configuration.plist

    8. Ctrl + W (Search) servername

    9. Change the servername <string> by entering this format

    <string>https://pxx-contacts.icloud.com:443/xxxx your icloud id xxxxxx/principal </string>

    10.Change username <string>

    <string>username%40xxxx.com:password</string>

    11. Ctrl + X and Save

    12. Open Address Book, iCloud should be Syncing!
     
  2. macrumors newbie

    Joined:
    Oct 31, 2005
    #2
    is this working for anyone? it's not for me...
     
  3. thread starter macrumors newbie

    Joined:
    Mar 18, 2009
    #3
    It just works for me on iPhone4, 4S and touch.

    What was the error message you are getting?
     
  4. macrumors newbie

    Joined:
    Oct 31, 2011
    #4
    Works, kinda!

    Hi,

    I got Address Book to collect iCloud data, however for me not all the contacts appear in the correct groups, in fact are removed from the groups and also every time it syncs it appears to duplicate the cards. I started with 154 cards and I’m now at over 840 and counting each time it syncs which are just duplicates of existing cards. Luckily though the duplications are not being synced back to iCloud and subsequently the iPhone.

    Any ideas ?
     
  5. macrumors newbie

    Joined:
    Oct 31, 2011
    #5
    what is 'icloud id'

    I understand most of these instructions, but I don't understand what is referred to as the 'icloud id'

    On the web page it suggests using the string of digits from inside ~/Library/Application\ Support/AddressBook/Support/Sources folder (I only have one in there as I've never set up 'accounts' in AddressBook before)

    I've tried that - with no luck.

    I've also tried using the same set of numbers that came back after setting up iCal info following instructions here:
    (that end in /principal)

    http://hints.macworld.com/article.php?story=20111014102515403


    That also didn't work.


    What sets of numbers are you using?

    Thanks.
    Jeff
     
  6. thread starter macrumors newbie

    Joined:
    Mar 18, 2009
    #6
    The Unique number is a 9 digits code, inside of configuration.plist

    ~/Library/Application Support/AddressBook/Sources/xxxxx/Configuration.plist


     
  7. stevep, Nov 1, 2011
    Last edited: Nov 1, 2011

    macrumors 6502a

    Joined:
    Oct 13, 2004
    Location:
    UK
    #7
    Partial success, but still not perfect.

    The instructions are slightly confused on a couple of points:

    Firstly, on step 10, the forum software has substituted a smiley for the actual characters
    Replace the smiley with a : followed by the letter p

    Secondly, the instructions for obtaining your 9 digit iCloud id are no good if your file system doesn't correspond to that of the originator - I'm on 10.6.8 and my file structure is different, I don't have a Support folder, and my configuration.plist file doesn't contain any 9 digit numbers. Instead, I obtained mine from the preferences pane of iCal (having already set that up to work on iCloud).

    (NOTE: After setting up the CardDAV account a new configuration.plist file is written to the Sources folder, but it (mine anyway) doesn't contain the 9 digit number! In any case, it's chicken and egg - you can't find it cos it won't be there before you set the account up).

    On the plus side, Address Book on the Mac has actually set up the CardDAV account, but I have yet to see anything happen in terms of synching between iCloud and the Mac. Perhaps the plist file needs a bit of manual editing, so if anyone wants to post what their own looks like that might help.

    <key>_className</key>
    <string>PHXCardDAVSource</string>
    <key>disabled</key>
    <integer>0</integer>
    <key>haveWriteAccess</key>
    <integer>0</integer>
    <key>isSharedABAccount</key>
    <integer>1</integer>
    <key>name</key>
    <string>CardDAV Server</string>
    <key>refreshInterval</key>
    <integer>1</integer>
    <key>serverSupportsSearch</key>
    <integer>0</integer>
    <key>servername</key>
    <string>https://p06-contacts.icloud.com:443/xxxxxxx/principal</string>
    <key>username</key>
    <string>myname%yourisp.co.uk:password</string>
    <key>usesKerberos</key>
    <integer>0</integer>


    ps just noticed, my 9 digit number is actually only 7 digits. Maybe this is part of the problem....
     
  8. macrumors 6502a

    Joined:
    Oct 13, 2004
    Location:
    UK
    #8
    Best I've done so far, despite a lot of editing of the configuration.plist file, is to get the CardDAV account to show in Address Book, without any warning triangles or exclamation marks, but no contacts downloaded from iCloud.

    Had this slightly strange error message at one stage, after changing the syntax of the username/password combination:

    [​IMG]

    Two slightly unexpected things - first the fact that i now seem to have 2 CardDAV groups, one with a normal icon and the other with a blue "i" icon (does this mean I actually connected to the correct cloud server?). Secondly, the weird URL shown, seemingly two servers involved, and nothing like the server address shown in the plist file.
     
  9. macrumors newbie

    Joined:
    Nov 1, 2011
    #9
    What did you do to change the user/pass?

    I've been unable to even get the error. Mine just sits there with no contacts synced.
     
  10. macrumors 6502a

    Joined:
    Oct 13, 2004
    Location:
    UK
    #10
    I edited the configuration.plist file (~/library/application support/addressbook/sources/some_weird_foldername/configuration.plist)

    I've been playing with this for a few hours now with no success. There are a couple of difficulties which the original post does not address:
    1. The server address. Is the pXX number same as the iCal server address? If not how can we find out what it is apart from trial and error?
    2. The mysterious cloud user-id. Again, is it the number that appears in the account details of the iCal preference pane? How many digits - the op says 9, mine is 7. If you can't obtain it from a working iCal account then how can we find out what it is.
    3. Why has no-one posted a sample configuration.plist file for a working setup? Surely this would answer a lot of simple questions on syntax.

    The other major problem that the op doesn't address is on the creation of the configuration.plist file itself. The file doesn't exist until an account is created. When it is created it only contains the information submitted. Post no. 6 above seems to suggest that the cloud user-id number will magically appear in the plist file - it won't.

    Also, the link given by the OP suggests using Terminal to edit the plist file (steps 3-11) - seems completely unnecessary to me as it can be opened and edited in TextEdit, unless there's something I don't know.
     
  11. macrumors newbie

    Joined:
    Nov 1, 2011
    #11
    I've been messing around with it to. I noticed the same thing.

    However, now that I have that account. I can go into prefs in AddressBook and it has the server path in there - in a section that can't be edited.

    Now, I've tried a few things with the user and pass.

    1. If I remove the :password it won't connect to icloud and it will give me an error. "The user “who%40isp.com” or password is invalid for the server “p07-contacts.icloud.com”. Verify the account settings in Address Book preferences."

    2. If I put the user and just a ':' - it will connect like there is no issue, but no contacts show up.

    3. If I change the %40 to a @ I get this error: "The server “p07-contacts.icloud.com” could not be found on the network. Verify the account settings in Address Book preferences."

    Oddly, can now change this in AddressBook prefs without having to go to the config file to do it. The only thing I need to go outside AB to alter is the server path, trying both /principal & /carddavhome/addressbook - both operate the same in regards to the 3 things above.

    Like you probably have done, I've tried every pXX from 01 to 10. Sorta like you, my ID # is 8 numbers, not 9. But I doubt that's the issue.

    I'm surprised it's working for anyone - however, this is the closest I've seen for it to work in that when everything is "right" in the config file - it will show connected, but no contacts sync (yes, I have my contacts in iCloud and can see them).
     
  12. macrumors newbie

    Joined:
    Nov 1, 2011
    #12
    I finally got it to work. There are some caveats.

    1. Follow the instructions listed above.

    2. Here's the info from the Config plist file of mine (with my data removed):

    <key>_className</key>
    <string>PHXCardDAVSource</string>
    <key>addressBookName</key>
    <string>card</string>
    <key>disabled</key>
    <integer>0</integer>
    <key>haveWriteAccess</key>
    <integer>1</integer>
    <key>isSharedABAccount</key>
    <integer>1</integer>
    <key>refreshInterval</key>
    <integer>0</integer>
    <key>serverSupportsSearch</key>
    <integer>1</integer>
    <key>servername</key>
    <string>https://p07-contacts.icloud.com:443/[icloud ID#]/principal</string>
    <key>username</key>
    <string>name%40isp.com:pass</string>
    <key>usesKerberos</key>
    <integer>0</integer>

    3. I then went back to AddressBook and into the prefs of the iCloud account. I put in my password into the password line.

    4. I then tried to turn on Google Contacts sync. It came up with a message and I canceled it.

    5. The iCloud account started to sync instantly.

    I started getting duplicated cards. I then had to go through and delete the duplicates. It seems to be a problem on the computer, but not in iCloud or on the iPhone. Can't figure out why it keeps duplicating cards multiple times. Another thing I notice is that contact's pictures aren't being sync'd. Unfortunate.
     
  13. macrumors 6502a

    Joined:
    Oct 13, 2004
    Location:
    UK
    #13
    Thanks for posting your plist file JD.
    I copied and pasted it into mine, put my own details in and it worked! I had to experiment with the pXX number - my iCal prefs say I'm on p06 but my contacts server only connects when I set it at p02.

    Yours has quite a few differences - this doesn't appear in my original:
    <key>addressBookName</key>
    <string>card</string>

    which I think might be quite an important bit. Also yours says:
    <key>serverSupportsSearch</key>
    <integer>1</integer>

    -mine was set to 0.

    I've also got the duplicating problem - done lots of deleting but it still duplicates at every refresh interval. Not sure what to do about that yet.....

    Really grateful you posted your plist - I am sure the missing string was stopping me from connecting. Cheers mate.
     
  14. macrumors 6502a

    Joined:
    Oct 13, 2004
    Location:
    UK
    #14
    More strange things happening now - most of my contacts disappeared from iCloud, but typing names or part-names in the search box shows that the entries are still there, just not displaying. And all the contacts in the CardDAV list on the Mac have now disappeared, except for three.

    Also iCloud seems to be having problems - I don't know whether it's coincidence or a completely unrelated Apple problem, but it just stopped responding and put up an error report with a 'send to Apple' button on it.

    Just as well I took a back-up this morning, and exported the complete address book at the same time!

    Had enough for the moment, I'll have another go tomorrow.
     
  15. macrumors newbie

    Joined:
    Nov 1, 2011
    #15
    You're welcome.

    The AddressBook name thing is what it's called on your computer in the left hand window. You can actually change that in AddressBook prefs.

    I noticed some quirky things with contacts. I ended up deleting all my contacts on my iPhone, on iCloud and then started fresh from my backup on my computer. Synced via iTunes, then switched on iCloud.

    The thing I've seen now is that all my cards duplicate based on the number of groups that I have. So there is a bug on the computer AddressBook in that groups duplicate all cards on the computer but not on the iPhone or in iCloud. Not sure why that's happening, hopefully someone with coding skills will figure that one out.

    Until then, I'm removing my groups as I don't use them that much and will wait to see if a fix comes in, or all my software gets Lion approval.
     
  16. macrumors newbie

    Joined:
    Nov 1, 2011
    #16
    Unfortunately I will need to turn off iCloud contacts. For some reason I can not get it to stop duplicating contacts.

    Even after removing all groups, Address Book kept duplicating. It reached 9 duplicates for each card. It locks up the computer. I then tried starting fresh again. No duplicates. I went on iCloud to edit the few double cards from pictured contacts. All of a sudden for each edit it would duplicate each card in the Address Book on the computer.

    Obviously there is an issue between Snow Leopard and Address Book.

    What a drag to have to go back to manual syncing of contacts.
     
  17. macrumors 6502a

    Joined:
    Oct 13, 2004
    Location:
    UK
    #17
    Same here - adding a new set of contacts every time it synchs, plus it's doing silly things with the iCloud AB as well (like deleting all but two of my contacts - it's done it twice in the last hour!).

    I'm not sure I believe that anyone with 10.6.8 has actually got this to work properly, either on this or any of the other discussion boards that I've looked on.

    Here's a challenge - if you reckon you've got it to work, post your Configuration.plist file here so we can at least have a stab at sorting it out.
     
  18. macrumors newbie

    Joined:
    Nov 3, 2011
    #18
    @Steve I get the same result and no sync at all. I see the Blue folder in the list on the left pane. Can somebody tell be if you need to leave both passwords in so in the username XXXXX%40XXX.com:password as well as my password in the password field?

    Can't understand why it works for some people and not others. :confused:

    Thanks.

    ----------

    Re:

    <string>name%40isp.compassword</string>

    do we put the : after the email address or leave it out without space?

    So in affect the password will be visible to anyone who goes into Addressbook preferences?
     
  19. macrumors 6502a

    Joined:
    Oct 13, 2004
    Location:
    UK
    #19
    It seems the username string needs to include the email address AND the password, separated by the colon (the forum software sees the : followed by the p and helpfully substitutes the :p smiley).

    I and J_D both seem to have found that the password box also needs an entry, although this doesn't seem to be reflected in the Configuration.plist file.

    I'm still slightly mystified as to why I get 2 CardDAV entries in AB - see my post no. 8 above - the blue one doesn't actually do anything, and when I synched it was only the brown one that was populated.

    And you're right, your password is visible in the AB preferences pane, and also appears in the plist file - not all that good in my view but I was prepared to put up with that to get AB synching properly. But it still doesn't work properly for me (connects but won't stop downloading duplicate entries) so I've deleted the Cloud account for the moment - I'll wait to see if the next SL 10.6.9 update gives us a proper iCloud entry in System Prefs.
     
  20. trek68, Nov 4, 2011
    Last edited: Nov 4, 2011

    macrumors newbie

    Joined:
    Nov 3, 2011
    #20
    Hi there,

    I am still able to connect to the server (I get the duplicate AB BLUE book icon) but NO contacts download when I click on the click on the little button that looks like this "~" next to the BROWN icon seems to refresh/connect bit when I hit the other button with "!" it throws up the same error:

    The CardDAV server returned an error (404) for the user “XXX%40XXXX.net:password”.

    URL: https://p02-contacts.icloud.com:443...ud.com:XXX/XXXXXXXXX/carddavhome/addressbook/

    My configuration.plist looks the same as both you guys. my unique ID is 9 digits.

    I tried p01-10 some of them connect and some don't connect at all but however, they still give the result - no contacts.

    Anybody have any other ideas.
     
  21. macrumors newbie

    Joined:
    Mar 18, 2008
    #21
    For the calendar, the servername <p06-caldav.icloud.com> works.

    Is it possible we just need to get the carddav address to the server?

    (ie. p06-carddav.icloud.com)
     
  22. macrumors 6502a

    Joined:
    Oct 13, 2004
    Location:
    UK
    #22
    As far as I know the cardDAV server is contacts.icloud.com rather than carddav.icloud.com. At least, that is what worked for me.
    But, although my iCal is synching fine on p06, I only managed to connect to the cardDAV server using p02. I think it is just trial and error to work out your own particular pXX number.
    And whether the number stops at p10 or goes up to p99 (as I saw suggested on another forum) is anyones guess.

    As I said above, I've turned off the cloud contacts as the constant duplication was driving me nuts, and I can't figure out a way round that.
    10.6.9 is the number I'm really interested in though...:)
     
  23. macrumors newbie

    Joined:
    Nov 3, 2011
    #23
    Does anyone get any result WITHOUT using the unique ID in the server?
     
  24. j-dubya, Nov 6, 2011
    Last edited: Nov 7, 2011

    macrumors newbie

    Joined:
    Nov 1, 2011
    #24
    Somehow I've gotten it to work... (and it's no longer duplicating contacts - per se).

    First, here's my configuration.plist file:

    <key>_className</key>
    <string>PHXCardDAVSource</string>
    <key>disabled</key>
    <integer>0</integer>
    <key>haveWriteAccess</key>
    <integer>1</integer>
    <key>isSharedABAccount</key>
    <integer>1</integer>
    <key>name</key>
    <string>iCloud</string>
    <key>refreshInterval</key>
    <integer>0</integer>
    <key>serverSupportsSearch</key>
    <integer>0</integer>
    <key>servername</key>
    <string>https://pXX-contacts.icloud.com:443/[icloud id#]/principal</string>
    <key>username</key>
    <string>user%40isp.com: pass</string>
    <key>usesKerberos</key>
    <integer>0</integer>


    Second, iCloud contacts were turned off on my phone, but contacts were somehow still on iCloud (not sure this matters). I created the account as per the original instructions. Then I fired up Address Book and iCloud account loaded up with contacts from iCloud. No duplicates.

    Next I turned on iCloud contacts on my iPhone. At which point I merged it with the contacts that were there (same as was on my computer). Mind you it started grinding on the computer. Then it did actually duplicate several contacts. I'm not sure the rhyme or reason why. But it was probably 10 out of 1000+.

    My thinking at this point was... I need to delete the duplicated contacts. But instead of deleting them willy nilly on the computer using "find duplicates", I decided to delete them in a different way than before. I didn't use 'find/delete duplicates'. I ended up changing one thing about a duplicated contact on iCloud.com, be it a note, or a number, email, something. Why? Because, trying to delete duplicates from the computer obviously only led to more duplicated contacts.

    What I noticed when I changed a contact on iCloud, is that it would only change one of the duplicates on the computer, the rest remained unchanged and in my mind corrupted somehow in the situation. Thus I deleted the duplicates that hadn't changed and left the 'changed' contact on the computer.

    As I did this going down my list in Address Book (iCloud version) on the computer, I noticed that the few contacts that were duplicated, would add to themselves each time I made changes. Thus the further down I went, the more isolated contacts there were duplicating, had duplicates. Yet, with the method I was doing to make an edit online to pick the right one on the computer it was somehow fixing everything as I went.

    I finished deleting all the duplicates using my edit method, and now... bingo - it works fine! I can make an edit on the computer and it pushes it off to the cloud no problem. I can edit on the cloud and it pushes it to the computer no problem.

    Everything appears to be in sync and working as it should. Next trick, making it work on my 2nd computer's Address Book... (to be continued).

    p.s. - it still doesn't pictures, but at least everything else appears to work.
     
  25. macrumors newbie

    Joined:
    Nov 1, 2011
    #25
    Setup on my 2nd computer and working perfectly fine. No duplicates.

    I've tested with edits from any source now get pushed to all other points without issue. Fantastic.

    I only wish it would sync the pictures. Oh well.

    Hope my last two posts help people. Seems the key here is, DO NOT use the 'find duplicates' in Address Book - that creates more problems than it solves. Do figure out what duplicates are corrupted by making initial edits on iCloud.com to see what Address Book is not looking at.

    Once you get your contacts sorted, it works as near as perfect as a hack can.
     

Share This Page