ASCredentialIdentityStore
A container that your extension fills to provide credentials through the QuickType bar.
Declaration
class ASCredentialIdentityStoreOverview
Make credential identities available to users directly as AutoFill suggestions by adding them to the shared 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 as AutoFill suggestions. Take advantage of the incremental change methods saveCredentialIdentities(_:completion:) and removeCredentialIdentities(_:completion:) to avoid rewriting the entire store every time you need to make a change.
You can fetch previously saved credential identities with credentialIdentities(forService:credentialIdentityTypes:). Call this method when preparing to store a credential to check whether your app has a saved credential for this domain.
When the user disables your extension, the system clears and disables your shared store. So before making updates, check to see that the store’s enabled to avoid unnecessary activity:
Topics
Getting the shared store
Checking the state of the store
Adding and removing credential identities
saveCredentialIdentities(_:completion:)replaceCredentialIdentities(_:completion:)removeAllCredentialIdentities(_:)removeCredentialIdentities(_:completion:)ASCredentialIdentityASPasskeyCredentialIdentityASPasswordCredentialIdentity
Fetching saved credential identities
credentialIdentities(forService:credentialIdentityTypes:)ASCredentialServiceIdentifierASCredentialIdentityStore.IdentityTypes
Recognizing errors
ASCredentialIdentityStoreErrorASCredentialIdentityStoreErrorDomainASCredentialIdentityStoreError.Code