I'm having trouble returning CNContact
using id. I used to list all contacts and do something with phone numbers, storing identifiers in an array.
Later, I would like to get a specific contact using one of the saved identifiers, using the following (where currentIdentifier
is the identifier that I saved earlier):
CNContact *currentContact = [[CNContact alloc] init];
currentContact = [self.contactStore unifiedContactWithIdentifier:currentIdentifier keysToFetch:@[[CNContactFormatter descriptorForRequiredKeysForStyle:CNContactFormatterStyleFullName]] error:&error];
However, I keep getting NULL
it when I load it.
source
share