TechnologiesFoundation, System & Concurrency

CoreTransferable

iOSmacOStvOSwatchOSvisionOS

CoreTransferable defines the Transferable protocol, which a type adopts to declare how it is encoded and decoded for drag-and-drop, copy-paste, and sharing across iOS, macOS, tvOS, watchOS, and visionOS. You describe these conversions by composing transfer representations that conform to TransferRepresentation, such as DataRepresentation for in-memory data, FileRepresentation for file-backed content, and ProxyRepresentation for standing in for another Transferable type. When content is exchanged as a file, you work with SentTransferredFile and ReceivedTransferredFile, and you can combine multiple representations using TupleTransferRepresentation while controlling exposure with TransferRepresentationVisibility.

Transfer Representations 4

The protocol and built-in representations that describe how a Transferable type is encoded and decoded.

  • Pr
    TransferRepresentationiOS 16.0+
    A declarative description of the process of importing and exporting a transferable item.
  • St
    DataRepresentationiOS 16.0+
    A transfer representation for types that provide their own binary data conversion.
  • St
    FileRepresentationiOS 16.0+
    A transfer representation for types that transfer as a file URL.
  • St
    ProxyRepresentationiOS 16.0+
    A transfer representation that uses another type's transfer representation

Composing Representations 2

Types for combining multiple representations and controlling where each one is exposed.

  • St
    TupleTransferRepresentationiOS 16.0+
    A wrapper type for tuples that contain transfer representations.
  • St
    TransferRepresentationVisibilityiOS 16.0+
    The visibility levels that specify the kinds of apps and processes

File Transfers 2

Values that represent files sent to or received from a transfer operation.

  • St
    SentTransferredFileiOS 16.0+
    A description of a file from the perspective of the sender.
  • St
    ReceivedTransferredFileiOS 16.0+
    A description of a file from the perspective of the receiver.

Structures 2

  • St
    CodableRepresentationiOS 16.0+
    A transfer representation for types that participate in Swift's protocols for encoding and decoding.
  • St
    TransferRepresentationBuilderiOS 16.0+
    Creates a transfer representation by composing existing transfer representations.

Protocols 1

  • Pr
    TransferableiOS 16.0+
    A protocol that describes how a type interacts with transport APIs

Extends 6

NeverAttributedStringDataStringURLNSItemProvider
← Foundation, System & Concurrency