I have created an AppShortcutsProvider containing a list of AppShortcuts. Is it possible to add shortcuts to this list conditionally? Or, can I add new shortcuts when an action is completed so that the app shortcuts are dynamically added to the system?
struct DefaultAppShortcutProvider: AppShortcutsProvider {
static var appShortcuts: [AppShortcut] {
AppShortcut(
intent: GoToBankTransferIntent(),
phrases: [
"Open (.applicationName) to do a bank transfer",
],
shortTitle: "Ordinary Bank Transfer",
systemImageName: "eurosign.circle"
)
}
static let shortcutTileColor: ShortcutTileColor = .lightBlue
}
I reported above my provider and would like to conditionally add at runtime the shortcuts to the ‘appShortcuts’ list