I've created an address book copy with
ABAddressBookRef addressBook = ABAddressBookCreate();
CFArrayRef people = ABAddressBookCopyArrayOfAllPeople(addressBook);
CFMutableArrayRef peopleMutable = CFArrayCreateMutableCopy(
kCFAllocatorDefault,
CFArrayGetCount(people),
people
);
now i would have just people with an address set in.
I've tried filtering with NSPredicate, but I don't know how to use the predicateWithFormat correctly with address book constants. This doesn't work:
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"(%@ like %@)", kABPersonFirstNameProperty, aVariable];
Can someone suggest me something? Thanks