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:

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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