---
title: currentMode
framework: appintents
role: symbol
role_heading: Instance Property
path: appintents/intentsystemcontext/currentmode
---

# currentMode

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

## Declaration

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

## Discussion

Discussion This value indicates whether the intent is running in the background or foreground, and the current 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: 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() }
