ABGroupAddMember - Cannot Add Contact to Group (iPhone Address Book)

Posted by cookeecut on Stack Overflow See other posts from Stack Overflow or by cookeecut
Published on 2010-03-28T15:41:05Z Indexed on 2010/03/28 15:43 UTC
Read the original article Hit count: 327

Filed under:
|
|

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?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about address