<!--
{
  "availability" : [
    "iOS: 16.0.0 - 26.0.0",
    "iPadOS: 16.0.0 - 26.0.0",
    "macCatalyst: -",
    "macOS: 13.0.0 - 26.0.0",
    "tvOS: 16.0.0 - 26.0.0",
    "visionOS: -",
    "watchOS: 9.0.0 - 26.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "AppIntents",
  "identifier" : "/documentation/AppIntents/AppIntent/openAppWhenRun",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "App Intents"
    ],
    "preciseIdentifier" : "s:10AppIntents0A6IntentP04openA7WhenRunSbvpZ"
  },
  "title" : "openAppWhenRun"
}
-->

# openAppWhenRun

A Boolean property that tells the system to consider the app intent even
if its app is not in the foreground.

```
static var openAppWhenRun: Bool { get }
```

## Discussion

This property is deprecated. Use [`supportedModes`](/documentation/AppIntents/AppIntent/supportedModes) instead. Setting this property to
`true` generates an error if the app intent runs in an app extension. For backward
compatability, you can set this property to `true` for app intents you run inside
your app. For example:

```swift
@available(*, deprecated)
extension OrderSoupIntent {
    static var openAppWhenRun: Bool { true }
}
```

---

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)