init(for:contentType:)
Creates a transfer representation for a given type and type identifier.
Declaration
init(for itemType: Item.Type = Item.self, contentType: UTType) where Encoder == JSONEncoder, Decoder == JSONDecoderParameters
- 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.