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

# init(payload:isCompact:layerCount:dataCodewordCount:)

Initializes an Aztec code descriptor for the given payload and parameters.

```
init?(payload errorCorrectedPayload: Data, isCompact: Bool, layerCount: Int, dataCodewordCount: Int)
```

## Parameters

`errorCorrectedPayload`

The data to encode in the Aztec code symbol.

`isCompact`

A Boolean indicating whether or not the Aztec code is compact.

`layerCount`

The number of layers in the Aztec code, from 1 to 32.

`dataCodewordCount`

The number of codewords in the Aztec code, from 1 to 2048.

## 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)