|
#1
| |||
| |||
| Adding Members to group in addressook with cocoa application Hello, I want to add groups to address book. i am able to add groupName to addressbook using KABGroupName Property. but I am not able to add members to group.can any one tell me how can i add members to Newly created group ? or I am trying to add Members to existig group also. I have implemented following code. ABAddressBook*book = [ABAddressBook SharedAddressBook]; ABPerson *person = [[[ABPerson alloc] init] autorelease]; ABGroup *aGroup = [[[ABGroup alloc] init] autorelease]; aGRoup = [book recordForUniqueID:"here i am writting UID of that group"]; [aPerson setValue @"joy" forProperty:kABFirstNameProperty]; [aPerson setValue @"nods" forProperty:kAbLastNameProperty]; [aGroup addMember:aPerson]; [book addRecord:aGroup]; [book save]; is there anything wrong with code? if yes ,please sggest me code for adding the members to group; i am not getting it. Thank You.. amax. |