[AppKit] CNPropertyNotFetchedException when using CNContactFormatter on CNContact retrieved from CNContactPicker

I am using CNContactPicker (with "CNContactKey.PostalAddresses" as "displayedKeys") to allow users to pick a contact + postal address.

Upon selection, I am retrieving the postal address using CNPostalAddressFormatter - this works without problems. However, when trying to retrieve the contact name using CNContactFormatter, this only works when the contact type is "Person". When it is "company", the app crashes with "CNPropertyNotFetchedException Reason: A property was not requested when contact was fetched" (because the formatter attempts to access "organizationName", which it apparently can't.

There also doesn't seem to be a way to "retrieve" this information without having to request contacts permissions manually. The same code (just using CNContactPickerViewController, but also without requesting contacts permissions) works without issue on iOS.

We need the following information in order to better assist you:

  • Code reproducing your issue.
  • iOS version reproducing your issue.
  • Does the issue also occur when using Xcode 16 beta 2?
[AppKit] CNPropertyNotFetchedException when using CNContactFormatter on CNContact retrieved from CNContactPicker
 
 
Q