<!--
{
  "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/init(payload:symbolVersion:maskPattern:errorCorrectionLevel:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Core Image"
    ],
    "preciseIdentifier" : "c:objc(cs)CIQRCodeDescriptor(im)initWithPayload:symbolVersion:maskPattern:errorCorrectionLevel:"
  },
  "title" : "init(payload:symbolVersion:maskPattern:errorCorrectionLevel:)"
}
-->

# init(payload:symbolVersion:maskPattern:errorCorrectionLevel:)

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

```
init?(payload errorCorrectedPayload: Data, symbolVersion: Int, maskPattern: UInt8, errorCorrectionLevel: CIQRCodeDescriptor.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 initialized [`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)