Dynamically generating AppShortcut phrases
I want to be able to dynamically update the phrase dictionary in an AppShortcut. However, whenever I abstract the phrases, the shortcut fails to display. That is, I am trying to do:
static var phrases: [AppShortcutPhrase<MyIntent>] = ["\(.applicationName) hello world"]
AppShortcut(
intent: MyIntent(),
phrases: phrases,
shortTitle: "hello world",
systemImageName: ""
)
However, the following works:
AppShortcut(
intent: MyIntent(),
phrases: "\(.applicationName) hello world",
shortTitle: "hello world",
systemImageName: ""
...