I have implemented AppShortcuts
in my app like the below and the shortcut seems to work correctly by tapping on the shortcut directly (within Shortcuts app) for all devices.
For two of my test devices, only had to utter the first phrase after app install and we correctly got the notification:
"Turn on 'MyApp` shortcuts with Siri?"
After saying yes, Siri + MyApp Shortcuts continued to work correctly.
Unfortunately on two of my other test devices, after uttering the first phrase, never got the notification, it merely opened my app (which, openAppWhenRun
is set to false
for that AppIntent
, so it shouldn't).
Can you help me with any hints as to what may be causing the two different results?
@available(iOS 16, *)
struct MyAppShortcuts: AppShortcutsProvider {
@AppShortcutsBuilder
static var appShortcuts: [AppShortcut] {
AppShortcut(intent: MyAppIntent(), phrases: ["Get my \(.applicationName) code", "What's my \(\.$service) code with \(.applicationName)", "What's my code for \(\.$service)"])
}
}