Contents

provideCredentialWithoutUserInteraction(for:)

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

Declaration

func provideCredentialWithoutUserInteraction(for credentialIdentity: ASPasswordCredentialIdentity)

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 provideCredentialWithoutUserInteraction(for:) method to ask your extension to provide the corresponding credential.

Call the context’s completeRequest(withSelectedCredential: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 cancelRequest(withError:) method instead using an error with domain ASExtensionErrorDomain and code userInteractionRequired. In turn, the system calls your prepareInterfaceToProvideCredential(for:) 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 ASExtensionError.Code.

See Also

Deprecated methods