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

# init(for:contentType:)

Creates a transfer representation for a given type and type identifier.

```
init(for itemType: Item.Type = Item.self, contentType: UTType) where Encoder == JSONEncoder, Decoder == JSONDecoder
```

## Parameters

`itemType`

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

`contentType`

A uniform type identifier that best describes the item.

## Discussion

This initializer uses JSON for encoding and decoding.

---

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)