One Logo Pool Ball
ContactProvider · IOS API REFERENCE

ContactProviderManager

class · iOS 18.0+ · SDK 27.1

class ContactProviderManager

An interface for the app to control its extension.

Members (8)

method · iOS 18.0+

invalidate

TypeScript
invalidate(): Promise<void>
Swift declaration
func invalidate() async throws

Requests that the extension terminate. This calls ``ContactProviderExtension/invalidate()`` on the extension.

init · iOS 18.0+

init

TypeScript
static init(domainIdentifier?: string): ContactProviderManager
Swift declaration
init(domainIdentifier: String = DefaultContactProviderDomain.identifier) throws

Creates a provider manager. If needed, the manager registers the ``DefaultContactProviderDomain`` for the extension. - Parameter domainIdentifier: A string to identify a domain of contacts to provide. Defaults to ``DefaultContactProviderDomain/identifier-swift.type.property``. - Throws: ``ContactProviderError/extensionNotFound`` if discovering the extension fails. - Throws: ``ContactProviderError/featureNotAvailable`` when running on an unsupported platform.

method · iOS 18.0+

signalEnumerator

TypeScript
signalEnumerator(collection?: ContactItem_Identifier): Promise<void>
Swift declaration
func signalEnumerator(for collection: ContactItem.Identifier = .rootContainer) async throws

Requests that the extension enumerate its contacts for the domain. You typically call this when you need to invoke the app extension on demand. One example is when the app receives a push notification informing it that updated contact data is available. - Parameter collection: The collection to enumerate; defaults to ``ContactItem/Identifier/rootContainer``.

method · iOS 18.0+

reset

TypeScript
reset(): Promise<void>
Swift declaration
func reset() async throws

Resets the extension domain. You typically call this when you need to delete all previously-provided contacts for the domain. The next invocation of the app extension restarts content enumeration for the domain.

get · iOS 18.0+

domain

TypeScript
get domain(): SDKHandle
Swift declaration
var domain: any ContactProviderDomain { get }

The domain that this instance manages. This value defaults to ``DefaultContactProviderDomain``.

method · iOS 18.0+

enable

TypeScript
enable(): Promise<void>
Swift declaration
func enable() async throws

Requests the person using the app to enable the extension domain. If necessary, this call waits for the person using the app to explicitly approve or deny using the extension domain. - Throws: `ContactProviderError.deniedByUser` if the person dismisses the prompt without enabling the extension domain.

method · iOS 18.0+

disable

TypeScript
disable(): Promise<void>
Swift declaration
func disable() async throws

Disables the extension domain. Disabling the extension deletes all previously-provided contacts for the domain.

get · iOS 18.0+

isEnabled

TypeScript
get isEnabled(): boolean
Swift declaration
var isEnabled: Bool { get }

A Boolean value that indicates whether the person using the app enabled the extension domain.

Skipped declarations

No declarations were skipped in this snapshot.

All ContactProvider types →