Hello, did you resolve this problem? Because I have the same issues. Here my code:
Intent.swift
struct Intent: AppIntent {
static var title: LocalizedStringResource = "Perform Intent"
static var openAppWhenRun: Bool = false
@MainActor
func perform() async throws -> some IntentResult {
return .result(dialog: "Hello World")
}
}
IntentExtension.swift
@main
struct IntentExtension: AppIntentsExtension {
}
struct Shortcuts: AppShortcutsProvider {
static var appShortcuts: [AppShortcut] {
AppShortcut(intent: Intent(), phrases: ["Perform intent"])
}
}
Probably for the recognition phase need to pass Shortcuts struct to IntentExtension but I don't understand how I can do it
Topic:
App & System Services
SubTopic:
General
Tags: