<!--
{
  "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/IntentModes/Current",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "App Intents",
      "AppIntents"
    ],
    "preciseIdentifier" : "s:10AppIntents11IntentModesV7CurrentV"
  },
  "title" : "IntentModes.Current"
}
-->

# IntentModes.Current

The current runtime behavior of an app intent.

```
struct Current
```

## Overview

This type provides information about an app intent’s current runtime behavior. When
an intent runs, its [`systemContext`](/documentation/AppIntents/AppIntent/systemContext) property contains additional contextual
information you can use to make decisions. Specifically, the [`currentMode`](/documentation/AppIntents/IntentSystemContext/currentMode)
property tells you whether the intent is currently running in the foreground or background.

Don’t create instances of this type yourself. Instead, compare the value in the
[`currentMode`](/documentation/AppIntents/IntentSystemContext/currentMode) property to the static values this type defines.
You can also check the [`canContinueInForeground`](/documentation/AppIntents/IntentModes/Current/canContinueInForeground) property to
determine if a background intent can switch to the foreground. The following code
shows how to use this type from an app intent’s [`perform()`](/documentation/AppIntents/AppIntent/perform()) method:

```swift
if systemContext.currentMode == .background {
   if systemContext.currentMode.canContinueInForeground {
      try await continueInForeground()
   } else {
      // The current conditions don't allow the app intent to continue in the foreground,
      // so it needs to continue in the background.
   }
}
```

## Topics

### Instance Properties

[`var canContinueInForeground: Bool`](/documentation/AppIntents/IntentModes/Current/canContinueInForeground)

A Boolean value that indicates whether running the app intent in the foreground
is possible.

### Type Properties

[`static var background: IntentModes.Current`](/documentation/AppIntents/IntentModes/Current/background)

A value that indicates the app intent is running in the background.

[`static var foreground: IntentModes.Current`](/documentation/AppIntents/IntentModes/Current/foreground)

A value that indicates the app intent is running in the foreground.

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Equatable`](/documentation/Swift/Equatable)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`Sendable`](/documentation/Swift/Sendable)

[`Hashable`](/documentation/Swift/Hashable)

---

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)