Post

Replies

Boosts

Views

Activity

'openAppWhenRun' property causing AppIntentsExtension to fail
import AppIntents struct AddTodoIntent: AppIntent { static var title: LocalizedStringResource = "Add Todo" static var openAppWhenRun: Bool = true func perform() async throws -> some IntentResult & ProvidesDialog { .result(dialog: "New todo added successfully.") } } struct ViewTodosIntent:AppIntent { static var title: LocalizedStringResource = "View Todos" func perform() async throws -> some IntentResult & ProvidesDialog { .result(dialog: "Here are your todos...") } } struct TodoAppShortcuts: AppShortcutsProvider { static var appShortcuts: [AppShortcut] { AppShortcut( intent: AddTodoIntent(), phrases: ["\(.applicationName) Add a new todo"], shortTitle: "New Todo", systemImageName: "plus.circle" ) AppShortcut( intent: ViewTodosIntent(), phrases: ["\(.applicationName) Show my todoso"], shortTitle: "Show todos", systemImageName: "plus.app" ) } } when we used, it wrong How did i can do it success?
0
0
63
Oct ’25
openAppWhenRun = true is wrong
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!
3
0
299
Oct ’25