明白了...看起来像是我应该预料到的某种 managedObjectContext 条件...
在一个视图控制器中,我这样做了:
ABAddressBookRef addressBook = ABAddressBookCreateWithOptions(NULL, NULL);
addressBookArray = (__bridge NSArray *)ABAddressBookCopyArrayOfAllPeople(addressBook);
// Prsented info on the user name, but not on the Emails
CFRelease(addressBook);
在第二个视图控制器中,我通过 addressBookArray 尝试保存一些周期,然后这样做:
ABAddressBookRef addressBook = ABAddressBookCreateWithOptions(NULL, NULL);
// Successfully accessed name properties (suspect they were chached some where ?
// Unsuccsfully accessed email properties (they have never been accessed so no chache and I get Null
CFRelease(addressBook);
修复...在 secondviewController 中重复:
addressBookArray = (__bridge NSArray *)ABAddressBookCopyArrayOfAllPeople(addressBook);
宾果问题解决了!!