I've implemented 2 different AppIntents, each includes their own AppShortcutsProvider with phrases unique to each AppIntent. Individually, they work great. But, when I try to include both in my app, only the last one defined works.
In my ContentView.onAppear(), I've tried calling:
ShortcutsOne.updateAppShortcutParameters()
ShortcutsTwo.updateAppShortcutParameters()
and only those defined in ShortcutsTwo are recognized by Siri.
I've tried including ShortcutsTwo's AppShortcut(intent:, phrases) in ShortcutOne's AppShortcutsProvider (since it's static var appShortcuts: is defined as an array, ie, [Shortcuts] - but that doesn't work either.
Overall, I've found the system to be rather temperamental. ie, I have had to power off my iPhone & reboot my Mac to get changes recognized.
Any thoughts on how to get 2 or more AppIntents to work in one app?
OK, I’ve found 2 things of interest.
AppShortcuts(intent:)
- but they CAN NOT have[]
s around them nor commas separating them:AppShortcuts
defined will royally mess with your head. Turn off other devices until you’ve finished debugging yourAppIntents
!