Search code examples
iossirikitsirishortcutsnsuseractivity

Intent summary not recognised/showing in ios shortcuts app -- only title


For my custom intent, I have provided a summary with one parameter in my intent definition file. On the simulator (and device) only the title of the intent shows up. The parameter can be selected from the "show more" dropdown menu. The preview in the intent file is showing as desired.

The only time I was able to achieve something beyond it showing just the tile was when I removed my parameter. It showed the Siri Suggestion summary as the text in the Shortcut app. I have tried re-installing the app on both device and simulator as well as playing with all the different options in the intent definition file.

I am new to this area of iOS dev, so I am still figuring out how this all works. I have downloaded the SoupChef example app. I have made a couple of assumptions:

  1. The summary is taken from the intent definition and is not affected by code in the intent handling section. Hence, I am stumped by the fact that what is given in the preview of the intent definition file is not showing up when I run the app. In WWDC19 after adding the summary, they say that its all you have to do...
  2. I have not enabled Siri in Capabilities, since I don't have a payed developer account, which I believe is required. I have assumed this has no effect.

Just looking for a couple of pointers, as I might have made a wrong assumption or missed out on something obvious.


Solution

  • I had a similar issue making the intent of title "add item to shopping list" available in the shortcuts app on my iOS devices. I had two parameters "Amount" and "Name" of the same Display Name I wanted to edit in the shortcuts summary entry (and not in the list of the more section).

    My custom Summary "add [Amount] item(s) of [Name]" in the "Shortcut apps" section was ignored and never showed in the shortcuts app. Also even though I used Name (of type string) as the input parameter this never was connected to any preceding actions output (even though provided of type "Text").

    I fixed both issued by renaming the parameters to lowercase "amount" and "name" with the display names being the uppercase equivalents.

    Since then the summary is used correctly and the preceding output gets automatically connected when I add the action.

    shortcuts app with correct summary shown

    PS: While Xcode validates upper/lowercase in the intent file for the types and intents it does not so for the parameters but the runtime simply ignores them... too bad.