A container that your extension fills to provide credentials through the QuickType bar.


@interface ASCredentialIdentityStore : NSObject


Make credential identities available to users directly in the QuickType bar by adding them to the sharedStore instance of the identity store. You can add identities during configuration in your extension’s override of the prepareInterfaceForExtensionConfiguration method. You can also update the shared store from within your extension’s host app.

Be sure to update the shared store whenever your app’s database changes to avoid showing stale identities in the QuickType bar. Take advantage of the incremental change methods replaceCredentialIdentitiesWithIdentities:completion: and removeCredentialIdentities:completion: to avoid rewriting the entire store every time you need to make a change.

When the user disables your extension, the system clears and disables your shared store. So before making updates, check to see that the store is enabled to avoid unnecessary activity:

let store = ASCredentialIdentityStore.shared
store.getState { state in
    if state.isEnabled {
        // Add, remove, or update identities.


Getting the Shared Store


The shared credential identity store.

Checking the State of the Store

- getCredentialIdentityStoreStateWithCompletion:

Gets the state of the credential identity store.


A representation of the state of a credential identity store.

Adding and Removing Credential Identities

- saveCredentialIdentities:completion:

Saves the given credential identities to the store.

- replaceCredentialIdentitiesWithIdentities:completion:

Replaces existing credential identities with new credential identities.

- removeAllCredentialIdentitiesWithCompletion:

Removes all existing credential identities from the store.

- removeCredentialIdentities:completion:

Removes the given credential identities from the store.


A description that uniquely identifies a particular credential.

Recognizing Errors


The domain for a credential identity store error.


Constants that represent credential identity store error codes.


Inherits From

See Also

Configuring the Credential Provider Extension

- prepareInterfaceForExtensionConfiguration

Prepares the interface to enable the user to configure the extension.