<!--
{
  "availability" : [
    "iOS: 26.2.0 -",
    "iPadOS: 26.2.0 -",
    "macCatalyst: 26.2.0 -",
    "visionOS: 26.2.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AuthenticationServices",
  "identifier" : "/documentation/AuthenticationServices/ASCredentialProviderViewController/prepareInterface(for:)-69elg",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Authentication Services"
    ],
    "preciseIdentifier" : "c:objc(cs)ASCredentialProviderViewController(im)prepareInterfaceForSavePasswordRequest:"
  },
  "title" : "prepareInterface(for:)"
}
-->

# prepareInterface(for:)

Prepares the interface to display a prompt to save a password credential.

```
func prepareInterface(for savePasswordRequest: ASSavePasswordRequest)
```

## Discussion

The system calls this method to tell your extension’s view controller to prepare to present a prompt to save a password credential.
After calling this method, the system presents the view controller to the user.

Upon success, call [`completeSavePasswordRequest(completionHandler:)`](/documentation/AuthenticationServices/ASCredentialProviderExtensionContext/completeSavePasswordRequest(completionHandler:)).

Always provide a way for someone to cancel the operation from your view controller, for example, by including a Cancel button in the navigation bar.
When someone cancels the operation, call `ASCredentialProviderExtensionContext/cancelRequest(with:)`, using [`userCanceled`](/documentation/AuthenticationServices/ASExtensionError/userCanceled).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)