How to use app intents

Asked on 07/30/2024

1 search

To use app intents effectively, you can follow the guidance provided in the sessions from WWDC 2024. Here are some key points:

  1. Which App Intents to Make:

    • Previously, app intents were meant for the most habitual tasks in your app. Now, anything your app does can be an app intent. Prioritize the most common functionalities but ensure a balance between a rich set of flexible app intents and avoiding unclear, brittle ones. (Design App Intents for system experiences)
  2. Structuring App Intents:

    • Avoid creating several different intents for the same task. Instead, structure your app's functionality into a flexible intent where parameters can be adjusted. For example, instead of making separate intents for different reminders, create one intent with a parameter for the reminder type. (Design App Intents for system experiences)
    • Ensure that parameter summaries are always readable as a sentence, regardless of the selected mode. This helps users understand what the app intent does when exploring in the shortcuts drawer. (Design App Intents for system experiences)
  3. Opening Your App:

    • In iOS 18, opening your app as part of an app intent is now common to show users that a change has been made. This can be done in two ways: if the intent inherently functions to open a particular view or if the intent completes with a change in the app UI or shows search results. (Design App Intents for system experiences)
  4. Using App Intents Across Features:

  5. Flexibility and Readability:

    • Design app intents to be flexible and readable across many configurations and use cases. Provide options to toggle binary parameters or open your app when appropriate. (Design App Intents for system experiences)

For more detailed guidance, you can refer to the sessions: