---
title: "foreground(_:)"
framework: appintents
role: symbol
role_heading: Type Method
path: "appintents/intentmodes/foreground(_:)"
---

# foreground(_:)

Creates and returns a foreground mode with a specified behavior.

## Declaration

```swift
static func foreground(_ foregroundMode: IntentModes.ForegroundMode) -> IntentModes
```

## Parameters

- `foregroundMode`: The foreground behavior to apply to the app intent. For example, specify doc://com.apple.AppIntents/documentation/AppIntents/IntentModes/ForegroundMode/immediate to bring the app to the foreground before running the app intent.

## Return Value

Return Value A set of options that describes the foreground behavior.
