import AppIntents
struct MGIntents: AppIntent { static var title = LocalizedStringResource("open app") static var openAppWhenRun: Bool = true func perform() async throws -> some IntentResult & ProvidesDialog { return .result(dialog: "app open") } }
struct AppItentsShortcuts:AppShortcutsProvider {
static var appShortcuts: [AppShortcut] {
AppShortcut(intent: MGIntents(),
phrases: ["\(.applicationName) Open app"],
shortTitle: "Open app",
systemImageName: "fan.desk.fill")
}
}
when use ,error more error。
when i delet openAppWhenRun ,is ok。why? how I can do it? thank you!