satish
satish

Reputation: 1255

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:

  1. Create the group with ABGroupCreate()
  2. Use ABGroupAddMember() to add a person to the group

The person record is not getting added. I am saving the address book.

Why doesn't the person get added to the group?

Upvotes: 2

Views: 993

Answers (2)

RAS
RAS

Reputation: 21

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.

Upvotes: 2

McDuff
McDuff

Reputation: 1

You need to do save of group record and save address book before the addmember call

Upvotes: 0

Related Questions