<!--
{
  "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/IntentSystemContext/currentMode",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "App Intents",
      "AppIntents"
    ],
    "preciseIdentifier" : "s:10AppIntents19IntentSystemContextV11currentModeAA0C5ModesV7CurrentVvp"
  },
  "title" : "currentMode"
}
-->

# currentMode

A value that indicates the foreground and background behavior for app intent’s action.

```
var currentMode: IntentModes.Current { get }
```

## Discussion

This value indicates whether the intent is running in the background or foreground, and
the current [`IntentModes.ForegroundMode`](/documentation/AppIntents/IntentModes/ForegroundMode) option if it requires the app to be in the foreground.
When handling an app intent that supports both foreground and background modes, use this
property to check the current run mode before making any adjustments, as shown in the
following example from an app intent type:

```swift
func perform() async throws -> some IntentResult {
    if systemContext.currentMode.canContinueInForeground {
        // Perform actions if it's OK for the app intent to request
        // to appear in the foreground if necessary.
        try await continueInForeground()
    }
    return .result()
}
```

---

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)