One Logo Pool Ball
CoreTransferable · IOS API REFERENCE

CodableRepresentation

struct · iOS 16.0+ · SDK 27.1

@preconcurrency struct CodableRepresentation<Item, Encoder, Decoder> where Item : Transferable, Item : Decodable, Item : Encodable, Encoder : TopLevelEncoder, Encoder : Sendable, Decoder : TopLevelDecoder, Decoder : Sendable, Encoder.Output == Data, Decoder.Input == Data

A transfer representation for types that participate in Swift's protocols for encoding and decoding. struct Todo: Codable, Transferable { var text: String var isDone = false static var transferRepresentation: some TransferRepresentation { CodableRepresentation(contentType: .todo) } } extension UTType { static let todo = UTType(exportedAs: "com.example.todo") } > Important: If your app declares custom uniform type identifiers, include corresponding entries in the app's `Info.plist`. For more information, see <doc://com.apple.documentation/documentation/uniformtypeidentifiers/defining_file_and_data_types_for_your_app>.

Members (0)

This type has no directly callable members in this snapshot. See the framework’s skipped declarations for unsupported APIs.

Skipped declarations

2 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

CodableRepresentation.init(for:contentType:)

The containing type needs Swift generic type arguments. (no canonical witness for Item)

CodableRepresentation.init(for:contentType:encoder:decoder:)

This declaration needs Swift generic type arguments. (no canonical witness for Encoder)

All CoreTransferable types →