SDWebImage / SDWebImageSwiftUI

SwiftUI Image loading and Animation framework powered by SDWebImage
https://sdwebimage.github.io/SDWebImageSwiftUI
MIT License
2.16k stars 223 forks source link

Image is not displaying in WidgetKit #155

Closed nitinkumardb closed 3 years ago

nitinkumardb commented 3 years ago

WebImage(url: URL(string: item.imageUrl)) .resizable() .scaledToFit() .cornerRadius(5) .frame(width: 80, height: 57)

This is my code to download the image. I've put this code in ForEach.

Simply I run my app and added the Widget. Other data are displaying but images are not appearing. After refreshing the Widget, some of the images appearing and after refreshing again, images get appear and disappear.

Using the latest version via CocoaPods.

Any help?

dreampiggy commented 3 years ago

Found solution.

But this issue can not been solved by using iOS 13 deployment target. Which means, I have to remove iOS 13 support and only support iOS 14+ using the new APIs. This is limited by Apple:

https://stackoverflow.com/questions/63274763/is-there-a-way-to-conditionally-use-stateobject-while-targeting-ios-13

I'll release 2.0.0 and bump iOS 14+ soon.