You need to save the changes via ABAddressBookSave()
Also, keep in mind if your contact does NOT already have an image, both the thumbnail and the full sized image will be added when you use ABPersonSetImageData
. However, if your contact has a full-sized image already, only the thumbnail will be set when you useABPersonSetImageData
.
// this is not production level code. method call return values and errors
// need to be handled properly
ABPersonRemoveImageData(person, &error); // clean any image first from ref
if (ABAddressBookSave(addressBook, &error))
{
ABPersonSetImageData(person, cfdata, &error);
ABAddressBookSave(addressBook, &error)
}