How do I design my shortcut intents?
Generated on 8/1/2024
1 search
To design your shortcut intents effectively, you can follow the guidance provided in the WWDC sessions. Here are the key steps and considerations:
-
Identify Functionality to Surface:
- Start by identifying the most habitual tasks in your app that could be useful outside of your app. This includes tasks that users frequently perform and would benefit from quick access.
- With iOS 18, the guidance has expanded to include more than just common functionality. Now, anything your app does can be an app intent. However, prioritize the most common and habitual functionalities first (Design App Intents for system experiences).
-
Structure Your App Intents:
- An app intent consists of a summary of what it does, which starts with the app followed by a verb, and includes the parameters that people need to fill out before the intent is run (Design App Intents for system experiences).
- Ensure that the parameter summary is always readable as a sentence, regardless of the selected parameters. This helps users understand what the app intent does when exploring in the shortcuts drawer (Design App Intents for system experiences).
-
Use Parameters Effectively:
- If your intent needs input, such as picking a number or entering text, choose from the library of parameter types provided by Apple.
- For intents that open their parameter in the app, use the special protocol
open intent
, which impliesopen when run
(Bring your app’s core features to users with App Intents).
-
Design for Flexibility and Readability:
- Avoid creating several different intents for the same task. Instead, create flexible intents that can handle various parameters and configurations (Design App Intents for system experiences).
- Ensure that your intents are meaningful and provide a clear action that users can understand and utilize effectively (Bring your app’s core features to users with App Intents).
-
Implementing Intents in Code:
- Define your intents with a localizable title and a perform method that does the action. Intents should always be actions that are meaningful to someone who uses the app (Bring your app’s core features to users with App Intents).
- Use app shortcuts to wrap intents, allowing you to pre-fill some or all of the parameters. This makes it easier for users to perform specific actions quickly (Bring your app’s core features to users with App Intents).
-
Testing and Refining:
- Test your app intents thoroughly to ensure they work as expected across different configurations and use cases.
- Refine the intents based on user feedback and usage patterns to improve their effectiveness and usability.
By following these steps, you can design powerful and flexible shortcut intents that enhance the user experience and make your app's functionality more accessible across the Apple ecosystem. For more detailed guidance, you can refer to the sessions Design App Intents for system experiences and Bring your app’s core features to users with App Intents.
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.