<!--
{
  "availability" : [
    "macOS: 10.3.0 - 10.14.0"
  ],
  "documentType" : "symbol",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/WebArchive/init(data:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "WebKit"
    ],
    "preciseIdentifier" : "c:objc(cs)WebArchive(im)initWithData:"
  },
  "title" : "init(data:)"
}
-->

# init(data:)

Initializes and returns the receiver, specifying the initial content data.

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

## Discussion

Use the [`data`](/documentation/WebKit/WebArchive/data) method to get the receiver’s data.

---

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)