how to make transferable

Asked on 2025-07-10

1 search

To make your app entities transferable, you can use the Transferable API, which allows you to describe how your models can be serialized and deserialized for sharing and data transfer. Here's a brief overview of how you can implement this:

  1. Extend Your Entity with Transferable: Implement a static transferRepresentation method in your entity. This method will define how your entity can be converted into different formats.

  2. Define Transfer Representations: Specify the formats you want to support, such as PDF, PNG, or RTF. The order of these representations is important; you should list them from the highest fidelity to the lowest.

  3. Use in Shortcuts: Once your entity is transferable, you can use it in Siri Shortcuts to convert and pass the entity to other app intents. For example, you can convert an entity to an image and import it into the photo library.

For more detailed guidance, you can refer to the session What’s new in App Intents (05:00) from WWDC 2024, which covers entities and files, including the use of the Transferable API.

What’s new in App Intents

What’s new in App Intents

Learn about improvements and all-new features with App Intents, and discover how this framework can help you expose your app’s functionality to Siri, Spotlight, Shortcuts, and more. We’ll show you how to make your entities more meaningful to the platform with the Transferable API, File Representations, new IntentFile APIs, and Spotlight Indexing, opening up powerful functionality in Siri and the Shortcuts app. Empower your intents to take people deep into your app with URL Representable Entities. Explore new techniques to model your entities and intents with new APIs for error handling and union values.

Get to know App Intents

Get to know App Intents

Learn about the App Intents framework and its increasingly critical role within Apple’s developer platforms. We’ll take you through a ground-up introduction of the core concepts: intents, entities, queries, and much more. You’ll learn how these pieces fit together and let you integrate your app through Apple’s devices, from software features like Spotlight and Shortcuts to hardware features like the Action button. We’ll also walk through how App Intents is your app’s gateway to integrating with Apple Intelligence going forward.

Code-along: Elevate an app with Swift concurrency

Code-along: Elevate an app with Swift concurrency

Learn how to optimize your app’s user experience with Swift concurrency as we update an existing sample app. We’ll start with a main-actor app, then gradually introduce asynchronous code as we need to. We’ll use tasks to optimize code running on the main actor, and discover how to parallelize code by offloading work to the background. We’ll explore what data-race safety provides, and work through interpreting and fixing data-race safety errors. Finally, we’ll show how you can make the most out of structured concurrency in the context of an app.