Sample code demonstrating Create interactive buttons for the Control Center using ControlWidgetButton and App Intents in iOS 18..
This project accompanies the article: ControlWidgetButton for Control Center Widgets
- Xcode 26.2+
- iOS 26.0+
- Swift 6.0
- Clone this repository
- Run
xcodegen generate(requires XcodeGen) - Open
ControlwidgetbuttonControlCenter.xcodeproj - Build and run
- App.swift: Source file
- ContentView.swift: Source file
- CreateNoteIntent.swift: Source file
- StartTimerIntent.swift: Source file
- PlayPlaylistIntent.swift: Source file
- ToggleDarkModeIntent.swift: Source file
- OpenScannerIntent.swift: Source file
- QuickNoteControl.swift: Source file
- TimerControl.swift: Source file
- PlayFavoritesControl.swift: Source file
- OpenScannerControl.swift: Source file
- MusicPlayer.swift: Source file
- NotificationNames.swift: Source file
- ControlWidgets.swift: Source file
Read the full article at BleepingSwift for detailed explanations and additional examples.
MIT License - see LICENSE for details.