Intent.requestConfirmation PRO
Intent.requestConfirmation pauses script execution and asks the user to confirm an action through a system-managed confirmation UI.
The confirmation interface consists of:
- A SnippetIntent UI (provided by you)
- Optional dialog text (system-generated or developer-defined)
Behavior:
- If the user confirms, the script continues (Promise resolves).
- If the user cancels, the script terminates immediately.
- The UI is fully managed by the system.
- The presented UI is defined by the provided SnippetIntent’s
perform()return.
This API is only available on iOS 26 or later.
API Definition
Parameter Details
actionName: ConfirmationActionName
A semantic keyword describing the type of action being confirmed. Apple uses this value to generate natural language around the confirmation UI.
Accepted values include:
Examples:
"set"→ “Do you want to set…?”"buy"→ “Do you want to buy…?”"toggle"→ “Do you want to toggle…?”
Choosing the correct semantic verb improves the clarity of the user-facing dialog.
snippetIntent: SnippetIntent
This must be an AppIntent registered with:
The UI displayed in the confirmation step comes from this SnippetIntent’s perform() return, which must be a TSX-based VirtualNode.
This is what the user sees and interacts with during confirmation.
options?: { dialog?: Dialog; showDialogAsPrompt?: boolean }
dialog?: Dialog
Optional text describing the confirmation request. Supports four formats:
Examples:
More structured version:
Use this to clearly explain what the user is confirming.
showDialogAsPrompt?: boolean
-
Default:
trueThe system shows the dialog as a modal prompt. -
falseThe dialog may be integrated directly inside the Snippet card instead of a separate prompt.
Execution Flow
When the script executes:
The following occurs:
-
Script execution is paused.
-
The system displays:
- The SnippetIntent UI
- Optional dialog text
-
The user chooses:
- Confirm → Promise resolves → script continues
- Cancel → script stops immediately
-
The system handles UI presentation and dismissal automatically.
There is no need to manually manage the UI lifecycle.
Usage Scenarios
Recommended for:
- Confirming important changes (colors, appearance, configurations)
- Confirming destructive or irreversible actions
- Steps requiring explicit user approval
- Initiating subflows requiring UI preview or choice (e.g., color picker, item selector)
- Sensitive operations (e.g., updating settings, performing actions with side effects)
Not recommended for:
- Actions that do not require user approval
- Simple background data processing
Complete Example
Below is a full working example demonstrating how to request user confirmation using a SnippetIntent.
It assumes you have two SnippetIntent AppIntents:
PickColorIntent— allows user to select a colorShowResultIntent— displays the final result
intent.tsx
Notes & Best Practices
- Requires iOS 26+ — do not call this API on earlier versions.
- Always include a clear dialog message to improve user understanding.
- Use for actions that require explicit approval or confirmation.
- When possible, combine with SnippetIntent to provide a richer preview UI.
- Scripts terminate automatically when the user cancels; do not rely on cleanup code afterward.
- Avoid calling it unnecessarily; only use when confirmation is truly meaningful.
