Issue #930


Declare AppShortcutsProvider, note that appShortcuts uses @AppShortcutsBuilder syntax

import AppIntents

struct OurShortcutsProvider: AppShortcutsProvider {
    static var shortcutTileColor: ShortcutTileColor = .lightBlue

    static var appShortcuts: [AppShortcut] {
        AppShortcut(intent: AskIntent(), phrases: [
            "Hey Joy",
            "Ask \(.applicationName)"

We can create an app intent in code

import AppIntents
import OpenAI

struct AskIntent: AppIntent {
    static var title: LocalizedStringResource = "Hey Joy"
    static var description: IntentDescription = "Ask me anything"
    @Parameter(title: "Prompt")
    var prompt: String?
    static var parameterSummary: some ParameterSummary {
        Summary("Ask question \(\.$prompt)")
    func perform() async throws -> some ProvidesDialog {
        guard let prompt else {
            throw $prompt.needsValueError("Please provide a question")

        let client = ChatService()
        let content = try await client.ask(prompt: prompt)
        if let content {
            return .result(dialog: IntentDialog(stringLiteral: content))
        } else {
            return .result(dialog: "No valid answer")

Update parameters

If the intents have dynamic parameters, we can tell AppIntents to refresh its parameters list, using updateAppShortcutParameters


Show tip view

Use SiriTipView

SiriTipView(intent: ReorderIntent(), isVisible: $isVisible)

Use ShortcutsLink



Look for appintentsmetadataprocessor in build log for potential errors

Some possible warnings

Metadata extraction skipped. No AppIntents.framework dependency found.