ABGroupAddMember returns false. Why?
When I call ABRecordRef aRecord = ABPersonCreate(), ABGroupAddMember() returns YES.
But when I use ABNewPersonViewController
- (void)newPersonViewController:(ABNewPersonViewController *)new开发者_高级运维PersonViewController didCompleteWithNewPerson:(ABRecordRef)person
And use the (ABRecordRef)person to ABGroupAddMember(), it returns NO.
Why?
Set the addressBook property of the ABNewPersonViewController to the address book reference, which you use to retrieve the group reference.
If you don't set the addressBook property before the ABNewPersonViewController is displayed, then it will create its own address book reference and the ABGroupAddMember function will not work.
加载中,请稍侯......
精彩评论