needsToContinueInForegroundError(_:alwaysConfirm:)
Asks the person to continue the intent’s action in the foreground.
Declaration
func needsToContinueInForegroundError(_ dialog: IntentDialog? = nil, alwaysConfirm: Bool = true) -> AppIntentErrorParameters
- dialog:
The localized text you want the system to display or speak to confirm the transition.
- alwaysConfirm:
trueto ask the person to confirm the transition. If you specifyfalse, the system might not ask for confirmation if it already received a recent confirmation. It doesn’t ask for confirmation if you recently called arequestChoiceorrequestConfirmationmethod of your intent, or asked to disambiguate a value. It does ask for confirmation if your app intent conforms to the Progressreportingintent protocol and you didn’t update the progress value recently.
Discussion
If your intent code encounters an error and needs to continue in the foreground, call this method to start the transition process. Before calling this method, use the contextual information in the intent’s systemContext property to verify the app can transition to the foreground. If you call this method and it’s not possible to transition the app to the foreground, the system throws an notAllowed error.