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

# IntentModes

A set of options you use to configure the runtime behavior of an app intent.

```
struct IntentModes
```

## Overview

This structure defines the mode values you can assign to the [`supportedModes`](/documentation/AppIntents/AppIntent/supportedModes) property
of your app intent. Intent modes indicate whether your app needs to run in the foreground or
background when performing the app intent’s action. For example, the [`foreground`](/documentation/AppIntents/IntentModes/foreground)
mode requires your app intent code to run in a foreground process.

At runtime, an app intent’s [`systemContext`](/documentation/AppIntents/AppIntent/systemContext) property also contains information
about whether the process is currently running in the foreground or background. Use that
information to make additional decisions about how to perform the action. For more information,
see the [`IntentModes.Current`](/documentation/AppIntents/IntentModes/Current) type.

## Topics

### Structures

[`struct Current`](/documentation/AppIntents/IntentModes/Current)

The current runtime behavior of an app intent.

[`struct ForegroundMode`](/documentation/AppIntents/IntentModes/ForegroundMode)

A type that defines the available foreground behaviors for an app intent.

### Type Properties

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

A value that indicates the action can run in the background.

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

A value that indicates the action needs to run in the foreground.

### Type Methods

[`static func foreground(IntentModes.ForegroundMode) -> IntentModes`](/documentation/AppIntents/IntentModes/foreground(_:))

Creates and returns a foreground mode with a specified behavior.

## Relationships

### Conforms To

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

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

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

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

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

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

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

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

---

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)