Post

Replies

Boosts

Views

Activity

Shortcut: Not able to perform() throws --> some ReturnsValue<Image>
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
0
0
533
Jan ’24
How to Render a WKWebView() to png-file (iOS16)?
I would like to render an html file (html string) to a png file (and save png to iCloud Drive). I am using WKWebView() with WKNavigationDelegate to check whether web view didFinish loading. WKWebView is working fine. Once WKWebView loading didFinish I would like to render the view to an UIimage (and then save as png file) - and here I am currently struggling to generate UImage with ImageRenderer(content: content) Any Idea how to render the webView to png OR any another approach to render HTML to png? Thanks a lot Eric
5
0
2.7k
Dec ’22
Call WeatherService within SiriKit Intent Definition File
Hi all, WeatherKit is working fine within my contentView. I am trying to use the WeatherKit within SiriKit Intent Definition files. I am trying to call let weather = try! await weatherService.weather(for: location) How can I handle my SiriKit intent with the async/await function? Latitude and longitude (location) will be provided as input values from Shortcuts App. Thanks
1
0
1.3k
Jun ’22
Shortcut: Not able to perform() throws --> some ReturnsValue<Image>
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
Replies
0
Boosts
0
Views
533
Activity
Jan ’24
How to Render a WKWebView() to png-file (iOS16)?
I would like to render an html file (html string) to a png file (and save png to iCloud Drive). I am using WKWebView() with WKNavigationDelegate to check whether web view didFinish loading. WKWebView is working fine. Once WKWebView loading didFinish I would like to render the view to an UIimage (and then save as png file) - and here I am currently struggling to generate UImage with ImageRenderer(content: content) Any Idea how to render the webView to png OR any another approach to render HTML to png? Thanks a lot Eric
Replies
5
Boosts
0
Views
2.7k
Activity
Dec ’22
Call WeatherService within SiriKit Intent Definition File
Hi all, WeatherKit is working fine within my contentView. I am trying to use the WeatherKit within SiriKit Intent Definition files. I am trying to call let weather = try! await weatherService.weather(for: location) How can I handle my SiriKit intent with the async/await function? Latitude and longitude (location) will be provided as input values from Shortcuts App. Thanks
Replies
1
Boosts
0
Views
1.3k
Activity
Jun ’22