<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreTransferable",
  "identifier" : "/documentation/CoreTransferable/TransferRepresentation",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "Core Transferable"
    ],
    "preciseIdentifier" : "s:16CoreTransferable22TransferRepresentationP"
  },
  "title" : "TransferRepresentation"
}
-->

# TransferRepresentation

A declarative description of the process of importing and exporting a transferable item.

```
protocol TransferRepresentation<Item> : Sendable
```

## Overview

Combine multiple existing transfer representations
to compose a single transfer representation that describes
how to transfer an item in multiple scenarios.

The following shows a `Greeting` type that transfers both as a `Codable` type
and by proxy through its `message` string.

```
import UniformTypeIdentifiers

struct Greeting: Codable, Transferable {
    let message: String
    var displayInAllCaps: Bool = false

    static var transferRepresentation: some TransferRepresentation {
        CodableRepresentation(contentType: .greeting)
        ProxyRepresentation(exporting: \.message)
    }
}

extension UTType {
    static let greeting = UTType(exportedAs: "com.example.greeting")
}
```

## Topics

### Implementing a transfer representation

[`body`](/documentation/CoreTransferable/TransferRepresentation/body-swift.property)

A builder expression that describes the process of importing and exporting an item.

[`Body`](/documentation/CoreTransferable/TransferRepresentation/Body-swift.associatedtype)

The transfer representation for the item.

[`Item`](/documentation/CoreTransferable/TransferRepresentation/Item)

The type of the item that’s being transferred.

### Configuring exports

[`exportingCondition(_:)`](/documentation/CoreTransferable/TransferRepresentation/exportingCondition(_:))

Prevents the system from exporting an item if it does not meet the supplied condition.

### Controlling visibility

[`visibility(_:)`](/documentation/CoreTransferable/TransferRepresentation/visibility(_:))

Specifies the kinds of apps and processes that can see an item in transit.

## Relationships

### Conforming Types

[`TupleTransferRepresentation`](/documentation/CoreTransferable/TupleTransferRepresentation)

[`CodableRepresentation`](/documentation/CoreTransferable/CodableRepresentation)

[`DataRepresentation`](/documentation/CoreTransferable/DataRepresentation)

[`FileRepresentation`](/documentation/CoreTransferable/FileRepresentation)

[`ProxyRepresentation`](/documentation/CoreTransferable/ProxyRepresentation)

### Inherits From

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Sendable`](/documentation/Swift/Sendable)

---

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)