I'm trying to format a contact's name using the new CNContactFormatter
. It looks like, I didn't fetch all needed name properties of the contact.
Terminating app due to uncaught exception 'CNPropertyNotFetchedException', reason: 'A property was not requested when contact was fetched.'
Does anyone know which ones are required? I tried fetching the following amongst a few others with no luck:
CNContactNamePrefixKey,
CNContactGivenNameKey,
CNContactFamilyNameKey,
CNContactMiddleNameKey,
CNContactPreviousFamilyNameKey,
CNContactNameSuffixKey,
CNContactNicknameKey,
CNContactPhoneticGivenNameKey,
CNContactPhoneticMiddleNameKey,
CNContactPhoneticFamilyNameKey,
CNContactOrganizationNameKey,
CNContactDepartmentNameKey,
CNContactJobTitleKey,
Neither the CNContactFomatter Class Reference nor the fetching method's documentation give any clue.
Thanks!