안녕하세요, 저는 ABPerson을 ABGroup에 추가하려고합니다. 나는 어떤 오류나 아무것도 얻지 않는다. 내 출력은 사람이 성공적으로 추가되었음을 알려줍니다.ABPerson을 ABGroup에 추가 할 수 없습니다. 오류가없고 실제로 추가되지 않습니다.
if(ABGroupAddMember(self.group, [allContacts objectAtIndex:indexPath.row], &error))
NSLog(@"Added person: %@ to group: %@", ABRecordCopyCompositeName([allContacts objectAtIndex:indexPath.row]), ABRecordCopyCompositeName(self.group));
if(ABAddressBookSave(self.addressBook, &error))
NSLog(@"Commited changes.");
이 두 문은 올바른 출력을 반환합니다.
그러나 그룹 구성원을 쿼리 할 때 빈 배열이 나타납니다.
NSLog(@"%@", ABGroupCopyArrayOfAllMembers(self.group)); //returns null
아무도 아이디어가 있다면 정말 고맙겠습니다.