I have this code:
CFArrayRef contactsList = ABAddressBookCopyArrayOfAllPeople(addressBookRef);
CFMutableArrayRef peopleMutable = CFArrayCreateMutableCopy(kCFAllocatorDefault, CFArrayGetCount(contactsList), contactsList);
CFArraySortValues(peopleMutable, CFRangeMake(0, CFArrayGetCount(peopleMutable)), (CFComparatorFunction) ABPersonComparePeopleByName, (void*) ABPersonGetSortOrdering());
CFIndex personCount = ABAddressBookGetPersonCount(addressBookRef);
Before on previous iOS it works but when I upgraded my xcode to latest version and my device to latest iOS I'm getting zero return. My project is not in ARC.
What happened here? And how address book return 0?