ABGroupAddMember - Cannot Add Contact to Group (iPhone Address Book)
- by cookeecut
Hi, I wonder if someone can help me out on this:
I'm writing some code to copy a set of contacts received through a web application into the Address Book.
I want to put all these new contacts under a certain group.
My code successfully creates the group and adds the contacts into the address book.
However, the 'ABGroupAddMember' operation fails. It fails without an error and the result it returns is true, meaning that according to the debugger the contact should have been added to the group. However, this does not work.
The portion of my loop code that adds the contact to the address book and then assigns it to the group is this:
ABAddressBookAddRecord(addressBook,person, &anError);
ABAddressBookSave(addressBook,&anError);
ABGroupAddMember(fusionLiveGroupRef,person, &anError);
ABAddressBookSave(addressBook,&anError);
All references are valid.
No errors are returned.
All operations return true.
What is going wrong?