swiftui-transferable

Implement SwiftUI Transferable data transfers for drag-and-drop, clipboard, and ShareLink.

4|1|Updated Apr 2, 2026
One-click install
npx skills add https://github.com/AutisticAF/claude-code-apple-dev-plugin --skill swiftui-transferable
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: swiftui-transferable
Source: https://github.com/AutisticAF/claude-code-apple-dev-plugin/tree/main/skills/swiftui-transferable
Command: npx skills add https://github.com/AutisticAF/claude-code-apple-dev-plugin --skill swiftui-transferable

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

SwiftUI drag-and-drop, copy/paste, and interop for custom data types are hard to implement consistently across Apple platforms. This skill provides the Transferable protocol patterns, multiple transfer representations, and actionable guidance to enable seamless data sharing in SwiftUI apps.

Core Features & Use Cases

  • Transferable protocol and multiple representations (CodableRepresentation, DataRepresentation, FileRepresentation, ProxyRepresentation) for flexible data transfers.
  • Drag-and-drop and clipboard integration through SwiftUI modifiers (.draggable(), .dropDestination(for:isTargeted:)) and PasteButton support.
  • ShareLink integration and File Importer/Exporter workflows for end-to-end content sharing and persistence.

Quick Start

Create a SwiftUI view with a Transferable item type, implement a CodableRepresentation, and enable dragging and dropping using .draggable and .dropDestination.

Frequently Asked Questions about swiftui-transferable

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement drag-and-drop in SwiftUI for custom data types?

SwiftUI drag-and-drop for custom types uses the Transferable protocol with .draggable() and .dropDestination(for:isTargeted:) modifiers to enable seamless data sharing. You define a Transferable conformance using representations like CodableRepresentation or DataRepresentation.

What's the best way to support multiple data representations in a SwiftUI drag-and-drop operation?

Multi-representation transfers in SwiftUI use the Transferable protocol with CodableRepresentation, DataRepresentation, FileRepresentation, or ProxyRepresentation. This allows a single dragged item to provide multiple data formats for flexible cross-application sharing.

Can I use ShareLink and fileImporter together for exporting Transferable data in SwiftUI?

Yes, ShareLink and fileImporter/fileExporter workflows integrate directly with Transferable data in SwiftUI. This combination enables end-to-end content sharing and persistence across iOS and macOS SwiftUI apps.

Does the SwiftUI Transferable protocol work across iOS and macOS for clipboard operations?

The Transferable protocol supports clipboard integration across iOS and macOS SwiftUI apps using PasteButton and standard transfer representations. It ensures consistent data sharing behaviors for custom types on both platforms.

How do I enable smooth list reordering with drag-and-drop in SwiftUI?

Smooth list reordering in SwiftUI uses the Transferable protocol and .draggable() and .dropDestination() modifiers. Defining a proper Transferable conformance ensures reliable data movement and insertion during list interactions.

When should I use ProxyRepresentation vs FileRepresentation for SwiftUI data transfers?

Use ProxyRepresentation to delegate SwiftUI transfers to an existing type, while FileRepresentation enables transferring data as a file on disk. Your choice depends on whether you need to leverage existing conformances or persist data during the transfer.