Its not possible to use a Contact Provider Extension from within a Notification Service Extension

A Notification Service Extension is one of the more capable extensions, and there's a lot that can be done within it (for example, it can invoke a Call Extension).

However its not possible to use a Contact Provider Extension within it. If a CPE has been enabled by the main app, then if a push is sent to the NSE, then within the NSE the ContactProviderManager class reports that the CPE is disabled and its not possible to anything with it. For example a call to ContactProviderManager.signalEnumerator() will hang and not complete.

I was hoping to create a contact and make it available to the system on receipt of a push, but this isn't going to possible.

Is this intentional and by design, or just due to the immaturity of this feature/iOS beta?

The documentation of a Contact provider Extension says:

"signalEnumerator() An example of using this call is to handle a push notification to your app when the provided contacts from your server update"

It therefore seems strange that the main cited use case for ContactProviderManager.signalEnumerator() isn't actually possible if the push is delivered to an extension rather than the app.

Answered by DTS Engineer in 798502022

However its not possible to use a Contact Provider Extension within it.

Thank you for filing the Feedback report. Your issue is expected behavior as ContactProviderManager can only be used from the app. We are going to update the docs to remove this misleading information.

I was hoping to create a contact and make it available to the system on receipt of a push, but this isn't going to possible.

Is this intentional and by design, or just due to the immaturity of this feature/iOS beta?

Two things here:

  1. Please file a bug on this and post the bug number back here. I'm not sure if this was intentional or not, but either way it's something the team should look at and signalEnumerator(for:) shouldn't be hanging under any circumstance.

  2. Keep in mind that even if/when this is supported, there are going to be cases when your NSE isn't going to be able trigger the update. At a minimum, your NSE is one of the few components that can run prior to first unlock and the CPE should definitely NOT be running prior to first unlock.

__
Kevin Elliott
DTS Engineer, CoreOS/Hardware

Hello, I filed FB14505986

However its not possible to use a Contact Provider Extension within it.

Thank you for filing the Feedback report. Your issue is expected behavior as ContactProviderManager can only be used from the app. We are going to update the docs to remove this misleading information.

Its not possible to use a Contact Provider Extension from within a Notification Service Extension
 
 
Q