<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ContactProvider",
  "identifier" : "/documentation/ContactProvider/ContactProviderManager",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "ContactProvider"
    ],
    "preciseIdentifier" : "s:15ContactProvider0aB7ManagerC"
  },
  "title" : "ContactProviderManager"
}
-->

# ContactProviderManager

An interface for the app to control its extension.

```
class ContactProviderManager
```

## Overview

Use this class to initially enable your contact provider app extension, making it visible to the system and other apps. To use the default domain, create a manager and call [`enable()`](/documentation/ContactProvider/ContactProviderManager/enable()). This is an `async` call, because it may prompt the person using your app to approve turning on the contact provider.

```swift
import ContactProvider

func enableExtensionExample() async {
    do {
        // The app creates a contact provider manager with a default domain.
        let manager = try ContactProviderManager()
        
        // May prompt the person to enable the default domain.
        try await manager.enable()
    } catch {
        // Handle the error.
    }
}
```

### Signaling the app extension

You also use `ContactProviderManager` when you need to invoke the app extension on demand. For example, when your app knows new contacts are available from your server, call [`signalEnumerator(for:)`](/documentation/ContactProvider/ContactProviderManager/signalEnumerator(for:)) so the extension can fetch and provide the changed contacts.

```swift
import ContactProvider

func refreshForNewContacts() async {
    do {
        let manager = try ContactProviderManager()
        try await manager.signalEnumerator()
    } catch {
        // Handle the error.
    }
}
```

> Important: You can only use `ContactProviderManager` in an app, not in an app extension.

## Topics

### Creating a contact provider manager

[`init(domainIdentifier:)`](/documentation/ContactProvider/ContactProviderManager/init(domainIdentifier:))

Creates a provider manager.

### Invoking the app extension

[`signalEnumerator(for:)`](/documentation/ContactProvider/ContactProviderManager/signalEnumerator(for:))

Requests that the extension enumerate its contacts for the domain.

### Managing the contact provider manager life cycle

[`invalidate()`](/documentation/ContactProvider/ContactProviderManager/invalidate())

Requests that the extension terminate.

### Managing the domain

[`domain`](/documentation/ContactProvider/ContactProviderManager/domain)

The domain that this instance manages.

[`enable()`](/documentation/ContactProvider/ContactProviderManager/enable())

Requests the person using the app to enable the extension domain.

[`isEnabled`](/documentation/ContactProvider/ContactProviderManager/isEnabled)

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

[`reset()`](/documentation/ContactProvider/ContactProviderManager/reset())

Resets the extension domain.

[`disable()`](/documentation/ContactProvider/ContactProviderManager/disable())

Disables the extension domain.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)