How do I add a control center button?
Asked on 2024-07-17
1 search
To add a control center button, you can follow the steps outlined in the session "Extend your app’s controls across the system" from WWDC 2024. Here’s a summary of the process:
-
Understand Controls: Controls are a new type of widget in iOS 18 that provide quick access to actions from your app. They can be added to system spaces like the control center, lock screen, and action button. There are two types of controls: buttons and toggles. Buttons perform discrete actions, while toggles change a piece of boolean state (e.g., turning something on or off).
-
Build a Control: Controls are built using WidgetKit, similar to how you would build a widget. You need to define the control's appearance and behavior using an app intent. The control uses a symbol, title, tint, color, and additional content provided by your app.
-
Configure the Control: You can make the control user-configurable by using the
app intent control value providerprotocol. This allows the control to be customized based on user preferences or specific configurations. -
Add to Control Center: Once your control is built and configured, it can be added to the control center. Users can add it from the controls gallery and assign it to various system spaces.
For a detailed walkthrough, you can refer to the session Extend your app’s controls across the system starting at the "Learn about controls" chapter.
If you need more specific details on building and configuring the control, you can check the chapters "Build a control" and "Make controls configurable" in the same session.

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.

Platforms State of the Union
Discover the newest advancements on Apple platforms.

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.
