One Logo Pool Ball
App Services · IOS API REFERENCE

CoreTransferable

Declare a transfer representation for your model types to participate in system sharing and data transfer operations.

23 types

23 callable entries

37 skipped

38% entry coverage

Generated from iOS SDK 27.1. Availability is shown on each declaration; permissions and entitlements still apply.

Types

Functions and constants

init · iOS 16.0+

init

TypeScript
static initContentTypeExportingImporting(contentType: _UniformTypeIdentifiers_UTType, exporting: ((arg0: string) => Promise<ArrayBuffer>), importing: ((arg0: ArrayBuffer) => Promise<string>)): DataRepresentation<string>
Swift declaration
init(contentType: UTType, exporting: @escaping @Sendable (Item) async throws -> Data, importing: @escaping @Sendable (Data) async throws -> Item)

Creates a representation that allows transporting an item as binary data. - Parameters: - contentType: A uniform type identifier that best describes the item. - exporting: A closure that provides a data representation of the given item. - importing: A closure that instantiates the item with given binary data.

init · iOS 16.0+

init

TypeScript
static initExportedContentTypeExporting(exportedContentType: _UniformTypeIdentifiers_UTType, exporting: ((arg0: string) => Promise<ArrayBuffer>)): DataRepresentation<string>
Swift declaration
init(exportedContentType: UTType, exporting: @escaping @Sendable (Item) async throws -> Data)

Creates a representation that allows exporting an item as binary data. - Parameters: - exportedContentType: A uniform type identifier that best describes the item. - exporting: A closure that provides a data representation of the given item.

init · iOS 16.0+

init

TypeScript
static initImportedContentTypeImporting(importedContentType: _UniformTypeIdentifiers_UTType, importing: ((arg0: ArrayBuffer) => Promise<string>)): DataRepresentation<string>
Swift declaration
init(importedContentType: UTType, importing: @escaping @Sendable (Data) async throws -> Item)

Creates a representation that allows importing an item as binary data. - Parameters: - importedContentType: A uniform type identifier that best describes the item. - importing: A closure that instantiates the item with given binary data

init · iOS 16.0+

init

TypeScript
static initContentTypeShouldAttemptToOpenInPlaceExportingImporting(contentType: _UniformTypeIdentifiers_UTType, shouldAttemptToOpenInPlace: boolean, exporting: ((arg0: string) => Promise<SentTransferredFile>), importing: ((arg0: ReceivedTransferredFile) => Promise<string>)): FileRepresentation<string>
Swift declaration
init(contentType: UTType, shouldAttemptToOpenInPlace: Bool = false, exporting: @escaping @Sendable (Item) async throws -> SentTransferredFile, importing: @escaping @Sendable (ReceivedTransferredFile) async throws -> Item)

Creates a transfer representation for importing and exporting transferable items as files. - Parameters: - contentType: A uniform type identifier that best describes the item. - shouldAttemptToOpenInPlace: A Boolean value that indicates whether the receiver gains access to the original item on disk and can edit it, or to a copy made by the system. - exporting: A closure that provides a file representation of the given item. - importing: A closure that instantiates the item with given file promise. The file referred to by the ``ReceivedTransferredFile/file`` property of the ``ReceivedTransferredFile`` instance is only guaranteed to exist within the `importing` closure. If you need the file to be around for a longer period, make a copy in the `importing` closure.

init · iOS 16.0+

init

TypeScript
static initExportedContentTypeShouldAllowToOpenInPlaceExporting(exportedContentType: _UniformTypeIdentifiers_UTType, shouldAllowToOpenInPlace: boolean, exporting: ((arg0: string) => Promise<SentTransferredFile>)): FileRepresentation<string>
Swift declaration
init(exportedContentType: UTType, shouldAllowToOpenInPlace: Bool = false, exporting: @escaping @Sendable (Item) async throws -> SentTransferredFile)

Creates a transfer representation for exporting transferable items as files. - Parameters: - exportedContentType: A uniform type identifier for the file `URL`, returned by the `exporting` closure. - shouldAllowToOpenInPlace: A Boolean value that indicates whether the receiver can try to gain access to the original item on disk and can edit it. If `false`, the receiver only has access to a copy of the file made by the system. - exporting: A closure that provides a file representation of the given item.

init · iOS 16.0+

init

TypeScript
static initImportedContentTypeShouldAttemptToOpenInPlaceImporting(importedContentType: _UniformTypeIdentifiers_UTType, shouldAttemptToOpenInPlace: boolean, importing: ((arg0: ReceivedTransferredFile) => Promise<string>)): FileRepresentation<string>
Swift declaration
init(importedContentType: UTType, shouldAttemptToOpenInPlace: Bool = false, importing: @escaping @Sendable (ReceivedTransferredFile) async throws -> Item)

Creates a transfer representation for importing transferable items as files. - Parameters: - importedContentType: A uniform type identifier for the file promise, returned by the `exporting` closure. - shouldAttemptToOpenInPlace: A Boolean value that indicates whether the receiver wants to gain access to the original item on disk and can edit it. If `false`, the receiver only has access to a copy of the file made by the system. - importing: A closure that creates the item with given file promise. The file referred to by the `file` property of the `ReceivedTransferredFile` is only guaranteed to exist within the `importing` closure. If you need the file to be around for a longer period, make a copy in the `importing` closure.

init · iOS 16.1+ · Deprecated in iOS 17.0

init

TypeScript
static initExportingImporting(exporting: ((arg0: string) => Promise<string>), importing: ((arg0: string) => Promise<string>)): ProxyRepresentation<string, string>
Swift declaration
init(exporting: @escaping @Sendable (Item) async throws -> ProxyRepresentation, importing: @escaping @Sendable (ProxyRepresentation) async throws -> Item)

Creates a transfer representation that's imported and exported by proxy through another transfer representation. - Parameters: - exporting: A closure that converts the item into desired representation. - importing: A closure that converts the chosen representation back into the transported item.

init · iOS 16.1+ · Deprecated in iOS 17.0

init

TypeScript
static initExporting(exporting: ((arg0: string) => Promise<string>)): ProxyRepresentation<string, string>
Swift declaration
init(exporting: @escaping @Sendable (Item) async throws -> ProxyRepresentation)

Creates a transfer representation that's exported by proxy through another transfer representation. - Parameters: - exporting: A closure that converts the item into desired representation.

init · iOS 16.1+

init

TypeScript
static initImporting(importing: ((arg0: string) => Promise<string>)): ProxyRepresentation<string, string>
Swift declaration
init(importing: @escaping @Sendable (ProxyRepresentation) async throws -> Item)

Creates a transfer representation that's imported by proxy through another transfer representation. - Parameters: - importing: A closure that converts the chosen representation into the transported item.

Skipped declarations

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

Never.body

The containing type is outside the generated SDK type index.

Never.transferRepresentation

The containing type is outside the generated SDK type index.

String.transferRepresentation

This protocol needs associated types that cannot yet cross the bridge.

AttributedString.transferRepresentation

This protocol needs associated types that cannot yet cross the bridge.

Data.transferRepresentation

This protocol needs associated types that cannot yet cross the bridge.

URL.transferRepresentation

This protocol needs associated types that cannot yet cross the bridge.

NSItemProvider.register(_:)

callback cannot propagate synchronous failure

NSItemProvider.loadTransferable(type:completionHandler:)

The iOS SDK compiler rejected this binding: cannot find 'AppIntents' in scope

Transferable.exportedContentTypes(visibility:)

Static protocol requirements cannot be called through an instance.

Transferable.importedContentTypes()

Static protocol requirements cannot be called through an instance.

Transferable.init(importing:contentType:)

A protocol cannot be constructed directly.

Transferable.init(importing:contentType:)

A protocol cannot be constructed directly.

TransferRepresentation.visibility(_:)

This protocol needs associated types that cannot yet cross the bridge.

TransferRepresentationBuilder.buildExpression(_:)

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

TransferRepresentationBuilder.buildExpression(_:)

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

TransferRepresentationBuilder.buildBlock(_:)

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

TransferRepresentationBuilder.buildBlock(_:_:)

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

TransferRepresentationBuilder.buildBlock(_:_:_:)

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

TransferRepresentationBuilder.buildBlock(_:_:_:_:)

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

TransferRepresentationBuilder.buildBlock(_:_:_:_:_:)

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

TransferRepresentationBuilder.buildBlock(_:_:_:_:_:_:)

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

TransferRepresentationBuilder.buildBlock(_:_:_:_:_:_:_:)

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

TransferRepresentationBuilder.buildBlock(_:_:_:_:_:_:_:_:)

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

TransferRepresentationBuilder.buildBlock(_:_:_:_:_:_:_:_:_:)

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

TransferRepresentationBuilder.buildBlock(_:_:_:_:_:_:_:_:_:_:)

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

TransferRepresentation.exportingCondition(_:)

callback cannot propagate synchronous failure

TransferRepresentation.suggestedFileName(_:)

This protocol needs associated types that cannot yet cross the bridge.

TransferRepresentation.suggestedFileName(_:)

callback cannot propagate synchronous failure

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)