Aug 312011
When updating an Address Book record in Cocoa, I read that I had modify the record using ABRecordSetValue(). But it wouldn’t change. Even if I called ABAddressBookSave() afterwards, it just wouldn’t change. It turns out I had to call ABAddressBookAddRecord() also. There is no ABAddressBookUpdateRecord(), but it turns out that the ABAddressBookAddRecord function does the same. I expected that it would give me a duplicate record, but it does not, it updates the existing record. Glad to have that sorted out, I hope this helps you as well.







Get it here
Hi Nik,
Thank you for this trick, I thought, I’ll be crazy if i’ve to do a remove/add just for an Update.
So easy:
- ABRecordSetValue with the property what was changed
- ABAddressBookAddRecord
- ABAddressBookSave
Thanks again.