Add an ABPerson to an ABGroup
I need to create an address book group, then add 10 ABPerson
records as group members.
This is what I'm doing:
- Create the group with
ABGroupCreate()
- Use
ABGroupAddMember()
to add a person to the group
The person record is not getting added. I am saving the address bo开发者_JAVA百科ok.
Why doesn't the person get added to the group?
Before a person record can be added to a group, it must already be in the Address Book database. If you need to add a new person record to a group and to the database at the same time, you must first add it to the address book database, save the database, and then add the person record to the group.
You need to do save of group record and save address book before the addmember call
精彩评论