AppShortcutsProvider pharses not recognizable by Siri

We have implemented AppIntents in iOS16 and the shortcuts are working fine when manually added in shortcuts app. But the shortcuts created programaticaly using AppShortcutsProvider with AppShortcutsPhrases are not at all recognized by Siri.

The AppIntents core feature is zero setup shortcuts, but it is not working as expected. Please suggest any fix for this.

Sample Code:

struct NotesShortcutProvider: AppShortcutsProvider {
    static var appShortcuts: [AppShortcut] {
        let shortcut = AppShortcut(intent: ShowTodayTasks(), phrases: ["Show today tasks","show my tasks today"])
        return [shortcut]
    }
}

Tried with applicationName as well but no luck.

Have you managed to sort this out? I'm running into the same issue, my Intents work when added manually to a new shortcut, but they are not setup automatically when installing the app. Adding .applicationName to my phrases did not fix it, I've also tried reinstalling both my app and the Shortcuts app but to no avail

For any who stumble across this question... I've not tried OP's let shortcut = / return [shortcut] implementation - instead I did this and it works for me:

struct NotesShortcutProvider: AppShortcutsProvider { static var appShortcuts: [AppShortcut] { AppShortcut(intent: ShowTodayTasks(), phrases:["Show today tasks, "show my tasks today"]) } }

I believe you need to include your application name in the phrase. That was what seemed to fix it for me.

Try this:

AppShortcut(intent: ShowTodayTasks(), 
phrases:["Show today tasks in \(.applicationName)", "Show my tasks today in \(.applicationName)"])

Is there any way to call a shortcut with Siri without needing to include the .applicationName?

AppShortcutsProvider pharses not recognizable by Siri
 
 
Q