I am working on contact app in which i want to add the contact with 3 different groups (i.e. A, B, C). And for adding (creating) new contact using native contact create.
ABRecordRef person = ABPersonCreate();
ABUnknownPersonViewController *controller = [[ABUnknownPersonViewController alloc] init];
controller.displayedPerson = person;
controller.allowsAddingToAddressBook = YES;
[self.navigationController pushViewController:controller animated:YES];
This will be add the contact on contact book. But i wish to add with Group Like A,B and C.
How can i add this contact in the group with the use of native Add Contact screen.
Please help me.
i hope it will work ,
You can achieve that by using
ABNewPersonViewController
available in the Addressbook Framework:Below iOS 9:
iOS 9 or greater:
You can use CNContactViewController of ContactsUI Framework :