下面的代码在iOS 11上不起作用,ABAddressBookCopyPeopleWithName适用于iOS 9,但在iOS 11上不起作用。
(void)showPersonViewController
{
NSString *cf = [self.data.displayName copy];
NSArray *people = (NSArray *)CFBridgingRelease(ABAddressBookCopyPeopleWithName(self.addressBook, (__bridge CFStringRef)cf));
if ((people != nil) && [people count])
{
}
else
{
}
}