How can I implement a toggle `AppIntent`?
Asked on 2025-08-27
1 search
To implement a toggle AppIntent
, you should structure your intent to support toggling between two states, such as turning a feature on or off. This is particularly useful for intents that only change between two states, like a flashlight app that toggles the flashlight on or off. By supporting toggle as the default parameter, the intent can switch states without needing to ask the user each time.
For example, if you have an intent to toggle a feature, you should:
- Define the intent with a parameter that supports toggling.
- Set the toggle as the default parameter to allow the intent to switch states without additional user input.
This approach is discussed in the session Design App Intents for system experiences (06:12).

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.

Extend your app’s controls across the system
Bring your app’s controls to Control Center, the Lock Screen, and beyond. Learn how you can use WidgetKit to extend your app’s controls to the system experience. We’ll cover how you can to build a control, tailor its appearance, and make it configurable.

Explore new advances in App Intents
Explore all the new enhancements available in the App Intents framework in this year’s releases. Learn about developer quality-of-life improvements like deferred properties, new capabilities like interactive app intents snippets, entity view annotations, how to integrate Visual Intelligence, and much more. We’ll take you through how App Intents is more expressive than ever, while becoming even easier and smoother to adopt. We’ll also share exciting new clients of App Intents this year like Spotlight and Visual Intelligence, and learn to write app intents that work great in those contexts.