Hi,
I started to implement my first App Intent. I have added a parameter (@Parameter). But what data type do I need do set to get a file as input?
Hi,
I started to implement my first App Intent. I have added a parameter (@Parameter). But what data type do I need do set to get a file as input?
It looks like this should be possible. To I need to set something special on the @Parameter property wrapper?.
I have solved the problem by myself. IntentFile
was the correct type.
@Parameter(title:"File")
var file: IntentFile
That may not get you all the way there unless you support all file types. Something like the following will only accept images, for example.
@Parameter(title: "Image", description: "Image to copy", supportedTypeIdentifiers: ["public.image"], inputConnectionBehavior: .connectToPreviousIntentResult) var file: IntentFile