---
title: "init(payload:symbolVersion:maskPattern:errorCorrectionLevel:)"
framework: coreimage
role: symbol
role_heading: Initializer
path: "coreimage/ciqrcodedescriptor/init(payload:symbolversion:maskpattern:errorcorrectionlevel:)"
---

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

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

## Declaration

```swift
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

Return Value  An initialized CIAztecCodeDescriptor instance or nil if the parameters are invalid
