Instance Method

provideCredentialWithoutUserInteractionForIdentity:

Attempts to provide the user-requested credential with no further user interaction.

Declaration

- (void)provideCredentialWithoutUserInteractionForIdentity:(ASPasswordCredentialIdentity *)credentialIdentity;

Parameters

credentialIdentity

The credential identity for which a credential should be provided.

Discussion

When the user selects a credential identity from the QuickType bar, the system calls the provideCredentialWithoutUserInteractionForIdentity: method to ask your extension to provide the corresponding credential.

Call the context’s completeRequestWithSelectedCredential:completionHandler: method to provide the credential if the extension can do so without further user interaction. If not—for example, because the user must first unlock a password database—call the cancelRequestWithError: method instead using an error with domain ASExtensionErrorDomain and code userInteractionRequired. In turn, the system calls your prepareInterfaceToProvideCredentialForIdentity: method to give your extension a chance to present an interface to handle the needed user interaction.

You can alternatively call the cancel method to indicate other error conditions using one of the codes in ASExtensionErrorCode.

See Also

Integrating Your Extension with the QuickType Bar

- prepareInterfaceToProvideCredentialForIdentity:

Prepares the interface for a user interaction, like a database login, that enables it to access and return the credential for the given identity.

ASPasswordCredentialIdentity

A description that uniquely identifies a particular credential.