<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppIntents",
  "identifier" : "/documentation/AppIntents/AppIntent/continueInForeground(_:alwaysConfirm:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "App Intents",
      "AppIntents"
    ],
    "preciseIdentifier" : "s:10AppIntents0A6IntentPAAE20continueInForeground_13alwaysConfirmyAA0C6DialogVSg_SbtYaKF"
  },
  "title" : "continueInForeground(_:alwaysConfirm:)"
}
-->

# continueInForeground(_:alwaysConfirm:)

Attempts to transition the app to the foreground after optionally requesting permission to do so.

```
func continueInForeground(_ dialog: IntentDialog? = nil, alwaysConfirm: Bool = true) async throws
```

## 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`](/documentation/AppIntents/ProgressReportingIntent)
protocol but didn’t update the progress value recently.

## Discussion

Call this method from your app intent’s [`perform()`](/documentation/AppIntents/AppIntent/perform()) method when you want to continue
running your code in the foreground. Before calling this method, use the contextual information
in the intent’s [`systemContext`](/documentation/AppIntents/AppIntent/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`](/documentation/AppIntents/AppIntentError/Unrecoverable/notAllowed) error.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)