Contents

needsToContinueInForegroundError(_:alwaysConfirm:)

Asks the person to continue the intent’s action in the foreground.

Declaration

func needsToContinueInForegroundError(_ dialog: IntentDialog? = nil, alwaysConfirm: Bool = true) -> AppIntentError

Parameters

  • dialog:

    The localized text you want the system to display or speak to confirm the transition.

  • alwaysConfirm:

    true to ask the person to confirm the transition. If you specify false, the system might not ask for confirmation if it already received a recent confirmation. It doesn’t ask for confirmation if you recently called a requestChoice or requestConfirmation method 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.

See Also

Running in the foreground or background