A multi-step latte-ordering flow built with iOS 26 Interactive Snippets and App Intents.
Interactive Snippets is a small SwiftUI demo that shows how to build a rich, multi-step interaction using Apple's new iOS 26 SnippetIntent API. Running the "Order a Latte" App Intent walks the user through picking a size, adjusting the milk percentage and shot count with tappable buttons, confirming the order, and finally showing an "Order Placed" summary — all inside interactive snippet views that surface in Shortcuts and the home-screen widget menu.
It is a focused learning project that demonstrates how AppIntent, SnippetIntent, requestChoice, requestConfirmation, and Button(intent:) compose into a stateful, in-snippet flow backed by a shared dependency.
- Multi-step App Intent flow —
OrderLatteIntentschains size selection, milk confirmation, and count confirmation into a single "Order a Latte" action. - Interactive snippet views —
MilkPercentageConfirmationIntentandLatteCountConfirmationIntentareSnippetIntents that render a liveLatteOrderViewfor each step. - In-snippet action buttons —
Button(intent:)firesLatteActionIntentto increment/decrement the milk percentage (0–100% in 10% steps) and shot count (1–10) directly inside the snippet. - Shared dependency state — a
LatteOrderManageris registered viaAppDependencyManagerand injected with@Dependency, so every intent reads and mutates the same order. - Choice + confirmation prompts — uses
requestChoicefor the latte size andrequestConfirmationto gate the milk and order steps. - Order summary UI — a gradient
LatteOrderViewshows the selected size, milk percentage, and count, ending with an "Order Placed" state.
Tip: Open the snippet from Shortcuts by choosing this app, then add the snippet to a widget from the Home Screen menu.
git clone https://github.com/ahmetbostanciklioglu/InteractiveSnippetsSwiftUI.git
cd InteractiveSnippetsSwiftUI
open InteractiveSnippetsSwiftUI.xcodeprojThen select an iOS 26 simulator (or device) and press ⌘R to build and run. Trigger the "Order a Latte" intent from Shortcuts to see the interactive snippets in action.
- iOS 26.1+
- Xcode 26+
- Swift 5.0
Ahmet Bostancıklıoğlu — @ahmetbostanciklioglu · ahmetbostancikli@gmail.com
⭐ If this helped you, consider giving the repo a star!





