<!--
{
  "availability" : [
    "macOS: 10.4.0 - 10.15.0"
  ],
  "documentType" : "symbol",
  "framework" : "Quartz",
  "identifier" : "/documentation/Quartz/QCComposition/init(data:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Quartz"
    ],
    "preciseIdentifier" : "c:objc(cs)QCComposition(cm)compositionWithData:"
  },
  "title" : "init(data:)"
}
-->

# init(data:)

Returns a composition object  initialized with the contents of a Quartz Composer composition file.

```
init!(data: Data!)
```

## Parameters

`data`

The contents of a file created with the Quartz Composer developer tool.

## Return Value

A Quartz Composer composition object or `nil` if there is an error.

---

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)