Hello Community,
I recently started to work on shortcuts with AppIntent and I want to have an image output on my shortcut action.
The output of a string is simple and working:
func perform() async throws -> some IntentResult & ReturnsValue<String> {
let myString : String = "Hello World"
return .result(value: myString)
I am having trouble to return an image. Ideally I want to load an image from iCloud Drive or from a website and throw image result.
I tried
func perform() async throws -> some IntentResult & ReturnsValue<Image> {
and
func perform() async throws -> some IntentResult & ReturnsValue<INFile> {
, but was not apple to write a proper code to
return .result(value: myImage)
.
Any help is very welcome and highly appreciated.
Have a good week Eric