<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.13.0 -",
    "tvOS: 11.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreImage",
  "identifier" : "/documentation/CoreImage/CIQRCodeDescriptor/descriptorWithPayload:symbolVersion:maskPattern:errorCorrectionLevel:",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Core Image"
    ],
    "preciseIdentifier" : "c:objc(cs)CIQRCodeDescriptor(cm)descriptorWithPayload:symbolVersion:maskPattern:errorCorrectionLevel:"
  },
  "title" : "descriptorWithPayload:symbolVersion:maskPattern:errorCorrectionLevel:"
}
-->

# descriptorWithPayload:symbolVersion:maskPattern:errorCorrectionLevel:

Creates a QR code descriptor for the given payload and parameters.

```
+ (instancetype) descriptorWithPayload:(NSData *) errorCorrectedPayload symbolVersion:(NSInteger) symbolVersion maskPattern:(uint8_t) maskPattern errorCorrectionLevel:(CIQRCodeErrorCorrectionLevel) errorCorrectionLevel;
```

## Parameters

`errorCorrectedPayload`

The data to encode in the QR code symbol.

`symbolVersion`

The symbol version, from 1 through 40.

`maskPattern`

The mask pattern to use in the QR code, from 0 to 7.

`errorCorrectionLevel`

The QR code’s error correction level: L, M, Q, or H.

## Return Value


An autoreleased [`CIAztecCodeDescriptor`](/documentation/CoreImage/CIAztecCodeDescriptor) instance
or `nil` if the parameters are invalid

---

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)