Contents

save(password:for:title:anchor:)

Save or update a password credential to the user’s preferred password manager in the system.

Declaration

final func save(password: ASPasswordCredential, for scope: ASAutoFillURLScope, title: String? = nil, anchor: ASPresentationAnchor) async throws

Parameters

  • password:

    The password credential to save.

  • scope:

    The scope to associate this credential with.

  • title:

    A custom title that credential managers may use to name the account.

  • anchor:

    The anchor for which any UI should be presented from.

Discussion

This functionality is equivalent to the saving behavior that occurs when submitting a form with a password field. The credential will be associated with the scope.