<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AuthenticationServices",
  "identifier" : "/documentation/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialProvider/createCredentialRegistrationRequest(challenge:name:userID:requestStyle:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Authentication Services"
    ],
    "preciseIdentifier" : "c:objc(cs)ASAuthorizationPlatformPublicKeyCredentialProvider(im)createCredentialRegistrationRequestWithChallenge:name:userID:requestStyle:"
  },
  "title" : "createCredentialRegistrationRequest(challenge:name:userID:requestStyle:)"
}
-->

# createCredentialRegistrationRequest(challenge:name:userID:requestStyle:)

```
func createCredentialRegistrationRequest(challenge: Data, name: String, userID: Data, requestStyle: ASAuthorizationPlatformPublicKeyCredentialRegistrationRequest.RequestStyle) -> ASAuthorizationPlatformPublicKeyCredentialRegistrationRequest
```

## Parameters

`challenge`

The challenge to sign.

`name`

The user name for the new credential.

`userID`

An identifier to be stored alongside the credential, which will be returned with the credential when it is used to authenticate.

`requestStyle`

The style for this request.

## Discussion\abstract Create a request to register a new platform credential.

---

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)