<!--
{
  "availability" : [
    "iOS: 18.2.0 -",
    "iPadOS: 18.2.0 -",
    "macCatalyst: 18.2.0 -",
    "macOS: 15.2.0 -",
    "tvOS: 18.2.0 -",
    "visionOS: 2.2.0 -",
    "watchOS: 11.2.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreTransferable",
  "identifier" : "/documentation/CoreTransferable/Transferable/exported(as:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core Transferable",
      "CoreTransferable"
    ],
    "preciseIdentifier" : "s:16CoreTransferable0B0PAAE8exported2as10Foundation4DataV22UniformTypeIdentifiers6UTTypeVSg_tYaKF"
  },
  "title" : "exported(as:)"
}
-->

# exported(as:)

Using the type’s `Transferable` conformance implementation,
exports a value as binary data.

```
func exported(as contentType: UTType?) async throws -> Data
```

## Parameters

`contentType`

A content type of the returned data.
If no content type is provided, CoreTransferable generates data using
the first `TransferRepresentation` in the `Transferable` conformance that supports export.

## Discussion

If the [`Transferable`](/documentation/CoreTransferable/Transferable) is backed by a file `URL`, this might cause loading the
entire file contents into memory. This function uses
the first representation that conforms to the given content type
in `static var transferRepresentation` requirement of the `Transferable` protocol
or in the `var body` property of a custom `TransferRepresentation`.

The default implementation of this function is available to all
types that conform to `Transferable` protocol.

---

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)