We use a Contact Provider extension (iOS 18+) to provide a read-only company
directory (~[Anzahl] employees) for caller identification on managed company iPhones.
Setup
-
ContactProviderExtension using the default domain.
-
The host app writes a JSON snapshot to an App Group container, then calls
ContactProviderManager().signalEnumerator(). enable() was called and confirmed. -
enumerateContent / enumerateChanges deliver items like this:
let contact = CNMutableContact()
contact.contactType = .person
contact.givenName = "Jane"
contact.familyName = "Doe"
contact.organizationName = "<Company>"
contact.departmentName = "..."
contact.jobTitle = "..."
contact.phoneNumbers = [
CNLabeledValue(label: CNLabelWork, value: CNPhoneNumber(stringValue: "+4970311234567")),
CNLabeledValue(label: CNLabelPhoneNumberMobile, value: CNPhoneNumber(stringValue: "+491711234567"))
]
contact.emailAddresses = [...]
contact.imageData = jpegData // 240x240, optional
return .contact(contact, ContactItem.Identifier(stableId)) -
Phone numbers are stored in E.164 format.
What works
- The contacts appear correctly in the Contacts app (own read-only list, full name,
organization, numbers, photo). - After a call, Recents shows the correct name.
- Regular contacts in the user's own address book are shown with their name on
incoming calls, both locked and unlocked.
The problem (incoming cellular call from a number that exists only in the provider)
- Device unlocked: the Dynamic Island shows the contact photo (or the initials if there
is no photo) but the PHONE NUMBER instead of the name. Expanding it also shows only
the number. - Device locked: only the number is shown, no name, no photo.
- Recents afterwards: correct name.
So the system clearly matches the contact (photo/initials appear), but does not use
the name on the incoming call UI.
Already checked
- No duplicate contact with the same number (old Exchange address book removed).
- MDM restrictions: "allow managed apps to write contacts to unmanaged accounts" and
"allow unmanaged apps to read contacts from managed accounts" are both enabled. - Setting contactType = .person explicitly did not change anything. [nur wenn getestet]
- [Ergebnis Test B: normaler Kontakt mit derselben Nummer funktioniert / funktioniert nicht]
- [Ergebnis Test A: Gerät ohne MDM, falls gemacht]
Environment
- iOS [Version], [Gerätemodell]
- App distributed via MDM (Sophos) as a managed app.
- Feedback: [FB-Nummer, falls schon gemeldet]
Questions
- Is this expected behavior for Contact Provider contacts on the incoming call UI,
or a known issue? - Is anything required in the ContactItem / CNContact (or extension configuration)
for the name to be used on incoming calls, especially on a locked device? - Given that DTS suggested Contact Provider for a business directory use case,
is caller identification on a locked device supposed to work?
Thanks!