<!--
{
  "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/CodableRepresentation/init(for:contentType:encoder:decoder:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Core Transferable"
    ],
    "preciseIdentifier" : "s:16CoreTransferable21CodableRepresentationV3for11contentType7encoder7decoderACyxq_q0_Gxm_07UniformG11Identifiers6UTTypeVq_q0_tcfc"
  },
  "title" : "init(for:contentType:encoder:decoder:)"
}
-->

# init(for:contentType:encoder:decoder:)

Creates a transfer representation for a given type with the encoder and decoder you supply.

```
init(for itemType: Item.Type = Item.self, contentType: UTType, encoder: Encoder, decoder: Decoder)
```

## Parameters

`itemType`

The concrete type of the item that’s being transported.

`contentType`

A uniform type identifier that best describes the item.

`encoder`

An instance of a type that can convert the item being transferred
into binary data with a specific structure.

`decoder`

An instance of a type that can convert specifically structured
binary data into the item being transferred.

---

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)