i want to delete the group on addressBook. i have try this code it is successfully delete the group but on main addressBook contact are not deleted.
CFErrorRef error = NULL;
ABAddressBookRef iPhoneAddressBook = ABAddressBookCreate();
ABRecordRef newGroup;
newGroup = ABAddressBookGetGroupWithRecordID(iPhoneAddressBook,groupId);
ABAddressBookRemoveRecord(iPhoneAddressBook, newGroup, &error);
ABAddressBookSave(iPhoneAddressBook,&error);
my requirement is i have one service to call every time when application is open i have get contact from service in a specific group. so i have delete old group and add new contact which is provide from service but it will twice the contact on main AddressBook because it will only delete group. i want to delete group as well as this group contact are delete on main addressBook both.
Finally my question is... How can i delete the group and group contact from main AddressBook please help me... Thank you in advance..