https://medium.com/@giulio.caggegi/use-app-intents-with-ios-16-90a341ccbc94
I create a demo according this article, and add the App Intents in Shortcuts App , then add a Scripting "Get text from ***" , but the result is Empty, how could I modify the AppEntity or add which attribute, so the Scripting "Get text from ***" can get text from the App Intents?
Thank you for the project. You should conform you entity type to Transferable
Here's a simple version:
extension PokemonAppEntity: Transferable {
static var transferRepresentation: some TransferRepresentation {
ProxyRepresentation(exporting: \.name)
}
}
You can make other choices for the representation implementation, so make sure to review the documentation for CoreTransferable
to understand all of the implementation choices you could make.
One other tip here is that you can configure the type of the variables in the Shortcuts app. If you tap on AppEntityExtension
within the Get text action, you'll get an editor that lets you use your Entity type, or some other system type, though you will still need the Transferable representation to a text type to make that work.
— Ed Ford, DTS Engineer