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

# RunSystemShortcutIntent

An app intent you use in widgets to open another app or perform an App Shortcut, custom shortcut, or system action.

```
struct RunSystemShortcutIntent
```

## Overview

Only use `RunSystemShortcutIntent` to initialize a <doc://com.apple.documentation/documentation/SwiftUI/Button> with the
<doc://com.apple.documentation/documentation/SwiftUI/Button/init(_:intent:)> initializer and place the button in a widget.
The run system shortcut intent doesn’t provide functionality in other contexts.

When a person configures the widget, they choose the button’s action. It can:

- Open another installed app.
- Perform an App Shortcut.
- Perform a custom shortcut a person creates in Shortcuts.
- Perform a system action.

The following example shows how an app offers a widget that allows people to launch another app from a button:

```swift
import SwiftUI
import WidgetKit
import AppIntents

struct LauncherWidgetConfigurationIntent: WidgetConfigurationIntent {
    static var title: LocalizedStringResource { "Launcher Widget" }
    static var description: IntentDescription { "Widget that runs a shortcut or opens an app" }

    @Parameter(title: "Action")
    var shortcut: SystemShortcut
}

struct LauncherWidget: Widget {
    let kind: String = "LauncherWidget"

    var body: some WidgetConfiguration {
        AppIntentConfiguration(
            kind: kind,
            intent: LauncherWidgetConfigurationIntent.self,
            provider: Provider()
        ) { entry in
            Button(
                intent: RunSystemShortcutIntent(shortcut: entry.configuration.shortcut)
            ) {
                VStack {
                    Image(systemName: "play.fill")
                        .font(.largeTitle)
                    Text(entry.configuration.shortcut.displayRepresentation.title)
                        .font(.caption)
                }
            }
        }
    }
}
```

The `RunSystemShortcutIntent` represents a person’s chosen action when they configure
your widget and it provides metadata the system needs for the widget’s configuration UI. It doesn’t provide your widget or app with
access to a shortcut’s actions, parameters, or implementation details. If a custom shortcut or App Shortcut requires an interaction,
for example, if it prompts a person for input, the system may open the Shortcuts app to perform the intent.

## Topics

### Creating the intent

[`init(shortcut:)`](/documentation/AppIntents/RunSystemShortcutIntent/init(shortcut:))

Creates an intent that performs a person’s configured action.

[`SystemShortcut`](/documentation/AppIntents/SystemShortcut)

An opaque reference to a user-configured action for use in a widget button.

## Relationships

### Conforms To

[`SystemIntent`](/documentation/AppIntents/SystemIntent)

[`AppIntent`](/documentation/AppIntents/AppIntent)

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

[`PersistentlyIdentifiable`](/documentation/AppIntents/PersistentlyIdentifiable)

[`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)