<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppIntents",
  "identifier" : "/documentation/AppIntents/IntentExecutionTargets",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "App Intents"
    ],
    "preciseIdentifier" : "s:10AppIntents22IntentExecutionTargetsV"
  },
  "title" : "IntentExecutionTargets"
}
-->

# IntentExecutionTargets

A set of options that describes which process performs an intent or entity query.

```
struct IntentExecutionTargets
```

## Overview

If you reuse intents and entities between your app, widget extension, or App Intents extension by using a Swift package or framework,
the system may perform your [`AppIntent`](/documentation/AppIntents/AppIntent) or [`EntityQuery`](/documentation/AppIntents/EntityQuery) from the app or App Intents extension.
By default, the system performs an intent or entity query using any available target.
Use `IntentExecutionTargets` to tell the system which targets can perform your [`AppIntent`](/documentation/AppIntents/AppIntent) or [`EntityQuery`](/documentation/AppIntents/EntityQuery). For example,
a browser app might represent browser tabs and bookmarks as app entities and offer app intents to add
a bookmark or open a browser tab. Adding a bookmark might be an action that can happen while the app
isn’t visible, so performing the action in the App Intents extension makes sense. However, opening
a new tab makes sense only when the app is visible, requiring the system to perform the intent in
the app’s process.

The following example shows an app intent that the system performs in either the main app or the app
intents extension:

```swift
struct MyIntent: AppIntent {
    static var allowedExecutionTargets: IntentExecutionTargets { [.main, .appIntentsExtension] }
}
```

## Topics

### Specifying the target

[`appIntentsExtension`](/documentation/AppIntents/IntentExecutionTargets/appIntentsExtension)

The system performs the intent or query in your app intents extension.

[`default`](/documentation/AppIntents/IntentExecutionTargets/default)

The system performs the intent or query in any available target.

[`main`](/documentation/AppIntents/IntentExecutionTargets/main)

The system performs the intent or query in the main app process.

[`widgetKitExtension`](/documentation/AppIntents/IntentExecutionTargets/widgetKitExtension)

The system performs the intent or query in a widget extension.

## Relationships

### Conforms To

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

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

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

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

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

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

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

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

---

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)