Hey @mvc2522 – I've been trying to better understand how transferable works with App Intents too. Here's something I discovered.
In the second action block (i.e. send email), tap on the AppEntity instance that's been passed in from the first action block (your app's AppIntent action). A sheet pops up, with some configuration options related to the type. The Type selector likely defaults to your entity type.
And below this, there is a parameter selector that once again lists your type (selected by default) followed by all the @Parameter from your app entity. If you tap the parameter containing your string and re-run the shortcut, it should get passed into the email. I'm not sure the purpose of entity type the default - in my testing I had similar behavior to you - a new email window opening up that was blank.
Alternatively, based on the transferable conformance you added, try changing the Type selector from your entity's type to Text and re-run the shortcut. This should work too.
I posted about something similar in this thread but haven't gotten any guidance yet. Let me know what you discover!
Post
Replies
Boosts
Views
Activity
Hi Ed @DTS Engineer, I'm encountering the same issue. Even in the Trails Sample App from WWDC.
If you build and run this project, the App Shortcuts are recognized in an iOS simulator and on a device. But in Xcode's App Shortcuts Preview tool, every utterance seems to return No Matching Intent, even when entering verbatim ones defined in the App Shortcut's phrases array.
FB16432161
Thanks for boosting this @vincent123. I found some new guidance on this in the App Intent docs.
via Integrating actions with Siri and Apple Intelligence:
Your existing app intents might overlap with functionality that assistant schemas provide. If you can make an existing app intent conform to a schema without making changes to parameters that the intent uses, proceed with adding schema conformance. However, changing existing app intent implementations or removing app intents can directly impact people because their custom shortcuts may no longer work.
To not break people’s existing workflows, create a new app intent in addition to an existing app intent. As a result, both intents appear in the Shortcuts app as actions. To avoid them appearing as duplicates, mark your new app intent as available to Apple Intelligence only by setting isAssistantOnly to true.
Similarly, you can set isAssistantOnly to true for any applicable app entities and app enums that conform to an assistant schema. After some time, you can remove the isAssistantOnly code and remove your old app intent.
So there's a short term solution, but creating near duplicate code as needed for app intents, entities and enums feels a little kludgy. Ideally we could write one schema conforming app intent with custom display properties (title, description, etc). Hopefully someone from will chime in as this will likely come up for other developers adopting various other schemas.
Thanks for your response @Frameworks Engineer!
I explored the .accessibilityHint modifier but in this instance that made the VoiceOver output more verbose.
Feedback ID: FB16354752
Hey @DustinKazi,
App Shortcuts can be parameterized, they just can't be open ended (like an Int or String for example). In your situation, defining set values at whatever granularity makes sense for your app as AppEnum cases could work for your SetBrightnessIntent.
Check out this clip from WWDC23 – Spotlight your app with App Shortcuts.
App Shortcuts supports parameters that have a fixed set of well-known parameter values that you can specify to Siri ahead of time. They do not support open-ended values like "Search my app for X," where X can be any input from the user. You can use parameters that are App Enums, in which case, the values are known ahead of time, or you could use parameters that are App Entities to be fully dynamic. All you need to do is return a list of entities in your query via suggestedEntities, like in my app.
This whole session from WWDC24 is great too – Bring your app's core features to users with App Intents.
An important distinction is that an App Shortcut is a higher level wrapper around an App Intent. And a parameterized App Shortcut is only valid with the parameter types mentioned above. That being said, you can still create an App Intent with an open ended parameter type. Any valid app intent can be exposed as an action building block for users in the Shortcuts app. The limitation is just around what intents can be used in a developer pre-defined App Shortcut.
re: SiriKit - this framework predates App Intents and is only relevant today if your app aligns with one of the predefined SiriKit domains. If you were looking to create a custom SiriKit intent, then you should just start with App Intents.