---
title: "init(for:contentType:encoder:decoder:)"
framework: coretransferable
role: symbol
role_heading: Initializer
path: "coretransferable/codablerepresentation/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.

## Declaration

```swift
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.

## See Also

### Creating a transfer representation

- [init(for:contentType:)](coretransferable/codablerepresentation/init(for:contenttype:).md)
