How to migrate intent definition to app intents
Generated on 8/3/2024
1 search
To migrate intent definitions to app intents, you can follow the guidance provided in the session "Design App Intents for system experiences" from WWDC 2024. Here are the key steps:
-
Identify Core Features: Start by identifying the core features of your app that you want to expose as app intents. These should be actions and content that are meaningful to users and can be useful outside of your app. Initially, prioritize the most common habitual functionality in your app.
-
Structure Intents: Structure your app intents to be flexible and readable across many configurations and use cases. Avoid creating several different intents for the same task. Instead, use parameters to make your intents more flexible. For example, instead of creating multiple intents for opening different reminders, create a single intent with a parameter to specify the reminder.
-
Avoid UI-Specific Intents: Do not create app intents that exclusively trigger specific UI elements. Instead, focus on the underlying tasks that these UI elements perform. For example, instead of an intent to tap a cancel button, create an intent to cancel an action.
-
Support Background Activities: If your app supports live activities, audio playback, or recording, create app intents that allow these actions to be performed from the background.
-
Parameter Summaries: Ensure that the parameter summaries for your app intents are always readable as a sentence, regardless of the selected parameters. This helps users understand what the intent does when exploring it in the shortcuts drawer.
-
Toggle Options: Provide options to toggle binary parameters or open your app when appropriate. For example, if an intent completes with a change in the app UI, such as creating a new board, it should finish by opening the app directly to the new board.
For more detailed guidance, you can refer to the session Design App Intents for system experiences (00:01:50).
Relevant Sessions
Bring your app to Siri
Learn how to use App Intents to expose your app’s functionality to Siri. Understand which intents are already available for your use, and how to create custom intents to integrate actions from your app into the system. We’ll also cover what metadata to provide, making your entities searchable via Spotlight, annotating onscreen references, and much more.
Design App Intents for system experiences
App Intents power system experiences in controls, Spotlight, Siri, and more. Find out how to identify the functionality that’s best for App Intents, and how to use parameters to make these intents flexible. Learn how to use App Intents to allow people to take action outside your app, and see examples of when to navigate into your app to show contextual information.
Bring your app’s core features to users with App Intents
Learn the principles of the App Intents framework, like intents, entities, and queries, and how you can harness them to expose your app’s most important functionality right where people need it most. Find out how to build deep integration between your app and the many system features built on top of App Intents, including Siri, controls and widgets, Apple Pencil, Shortcuts, the Action button, and more. Get tips on how to build your App Intents integrations efficiently to create the best experiences in every surface while still sharing code and core functionality.