<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AuthenticationServices",
  "identifier" : "/documentation/AuthenticationServices/ASAuthorizationPublicKeyCredentialResidentKeyPreference",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Authentication Services"
    ],
    "preciseIdentifier" : "c:@T@ASAuthorizationPublicKeyCredentialResidentKeyPreference"
  },
  "title" : "ASAuthorizationPublicKeyCredentialResidentKeyPreference"
}
-->

# ASAuthorizationPublicKeyCredentialResidentKeyPreference

A structure that specifies the relying party’s preference for resident key storage.

```
struct ASAuthorizationPublicKeyCredentialResidentKeyPreference
```

## Topics

### Creating the preference

[`init(_:)`](/documentation/AuthenticationServices/ASAuthorizationPublicKeyCredentialResidentKeyPreference/init(_:))

Creates the object with a preference.

[`init(rawValue:)`](/documentation/AuthenticationServices/ASAuthorizationPublicKeyCredentialResidentKeyPreference/init(rawValue:))

Creates the object with a preference.

### Getting preferences

[`discouraged`](/documentation/AuthenticationServices/ASAuthorizationPublicKeyCredentialResidentKeyPreference/discouraged)

The preference for the device not to store the resident key.

[`preferred`](/documentation/AuthenticationServices/ASAuthorizationPublicKeyCredentialResidentKeyPreference/preferred)

The preference for the device to store the resident key.

[`required`](/documentation/AuthenticationServices/ASAuthorizationPublicKeyCredentialResidentKeyPreference/required)

The device must store the resident key.



---

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)