I have a use-case where I want to display a remote image in a Live Activity. The image can only be downloaded when the user starts the activity.
I wonder if there is a recommended way to do this. I tried using AsyncImage
in the widget view, but I assume it's not working because of the network connectivity limitation of Live Activities. I also tried downloading the image beforehand in the main app and passing it as a parameter of my ActivityAttributes
, however requesting the Activity results in a nondescript error: Error Domain=com.apple.ActivityKit.ActivityInput Code=1 "(null)".
The only other way to achieve this I could think of is using app groups and storing the image on disk for the widget extension to load it again, which seems unnecessarily error-prone.
I haven't tried this last approach yet, because I wanted to gather some feedback first. I'm happy about any tips and pointers you might have!