ABAddressBookRef addressBook = ABAddressBookCreateWithOptions(nil, nil);
ABAddressBookRequestAccessWithCompletion(addressBook, ^(bool granted, CFErrorRef error) {
NSArray *folks = (__bridge NSArray *)(ABAddressBookCopyArrayOfAllPeople(addressBook));
NSLog(@"%@",folks);
});
我可以在不提示用户的情况下访问联系人。打开设置>隐私>联系人我看不到我的应用程序的条目。(在模拟器中运行)