Requires Scripting PRO
Intent.continueInForeground is an API that leverages the iOS 26+ AppIntents framework to request the system to bring the Scripting app to the foreground while a Shortcut is running.
This method is used when a script—invoked from Shortcuts—requires full UI interaction within the Scripting app (for example: presenting a form, editing content, picking files, showing a full screen navigation flow, etc.).
When invoked:
Because this is a system-level capability of AppIntents:
This API requires iOS 26 or later.
dialog?: Dialog | nullAn optional message explaining why the workflow needs to continue in the foreground.
Dialog supports four formats:
Examples:
Passing null will suppress the dialog entirely (not recommended unless you fully understand the UX implications).
options?: { alwaysConfirm?: boolean }Controls whether the system should always ask for confirmation:
alwaysConfirm: false (default)
The system may decide whether confirmation is needed based on context.
alwaysConfirm: true
The system always presents the confirmation dialog.
When called inside intent.tsx:
The Shortcut pauses execution.
The system presents a confirmation dialog.
If the user accepts:
await.If the user cancels:
This mirrors the behavior of Apple’s AppIntents continueInApp() functionality for system apps.
Use continueInForeground when the next step cannot run in the background, including:
Navigation.present)It should not be used for simple data processing or non-interactive tasks.
Below is the full working example demonstrating how continueInForeground enables a Shortcut to transfer execution into the Scripting app and then return UI input back to Shortcuts.
Requires iOS 26+ Do not call this API on older systems.
Use dialogs to explain why foreground interaction is required This improves user trust and Shortcuts clarity.
Always handle the cancellation case If the user cancels, your script stops. Avoid assuming foreground UI will always appear.
Foreground UI must be meaningful Only use this API when the upcoming step truly requires UI.
Can be combined with SnippetIntent (iOS 26+) For workflows that mix in-Shortcut Snippet UI with in-app full UI.
Intent.continueInForeground enables scripts invoked from Shortcuts to request foreground execution when UI interaction is required. It is:
Dialog systemThis method allows Scripting to support advanced automation flows that seamlessly transition between Shortcuts and the full Scripting app UI.