another thread mentioned ABPersonCopyParentGroups -- but this is wrong -n.a. on ios.
there is no api call so doing this directly is needed
ABRecordRef personToFind = ....
ABRecordID id = ABRecordGetRecordID(personToFind);
NSArray *groups = (__bridge_transfer NSArray*)ABAddressBookCopyArrayOfAllGroups(bookRef);
for(ABGroupRef group in groups) {
NSArray *members = (__bridge_transfer NSArray*)ABGroupCopyAllMembers(group);
for(ABRecordRef member in members) {
if(id == ABRecordGetRecordID(member){
NSLog(@"found in group %@!", ABGroupCopyProperty(group, kABGroupName);
break;
}
}
}
*typed inline, no guarantees -- there are likely typos!