ABAddressBookCopyPeopleWithName在iOS 11上不起作用

时间:2017-11-10 15:12:33

标签: objective-c ios11 abaddressbook

下面的代码在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
        {
        }
    }

0 个答案:

没有答案