I'm having trouble returning CNContactusing 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 currentIdentifieris 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 NULLit when I load it.
source
share