Updating an Address Book record

Written by: | Posted on:

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.

Image Image

Father, husband, software developer, musician and photographer.


Get to know what I'm up to

© 2020 Niklas Saers Contact Me