how do i make an action in my app show up in the control center/lock screen? new api or it just happens
Generated on 8/2/2024
1 search
To make an action in your app show up in the Control Center or Lock Screen, you need to use the new controls API introduced in iOS 18. This API allows you to create controls, which are a new type of widget that can be placed in system spaces like the Control Center, Lock Screen, and the action button on iPhone 15 Pro.
Here are the steps to create a control:
- Define the Control: Use the controls API to specify the type of control (button or toggle), a symbol, and an app intent. Controls can perform discrete actions or toggle a boolean state.
- Configure the Control: Customize the control's display name, symbol, and additional content. You can also add a description for when the control is being configured.
- Add to System Spaces: Once defined, your control will be available in the new controls gallery, where users can add it to their Control Center, Lock Screen, or action button.
For more detailed guidance, you can refer to the session Extend your app’s controls across the system (17:14).
Relevant Sessions
- Extend your app’s controls across the system
- Bring your app’s core features to users with App Intents
- Platforms State of the Union
These sessions provide comprehensive information on how to leverage the new controls API and integrate your app's actions into various system spaces.
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.
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.
Build a great Lock Screen camera capture experience
Find out how the LockedCameraCapture API can help you bring your capture application’s most useful information directly to the Lock Screen. Examine the API’s features and functionality, learn how to get started creating a capture extension, and find out how that extension behaves when the device is locked.