SDWebImage / SDWebImageSwiftUI

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

WebImage with SVG working on Simulator and not on real device #284

Closed kekko7072 closed 6 months ago

kekko7072 commented 7 months ago

I have this code witch it's working on the device simulator but not in real device iPhone 8 with iOS 16.6.

WebImage(url: URL(string: element.icon.url))
                                                .placeholder {ProgressView()}.resizable().frame(width: 22, height: 22).opacity(activitySubtype?.id == element.id ? 1 : 0.4)

No error it's reported in console.

dreampiggy commented 7 months ago

This, SVG url when using SDWebImageSVGCoder, which rely on the current System CoreSVG framework implementation

So, maybe your iPhone Simulator or iOS deveice use the different OS version.

Since it's system framework, so we can not provide the fix.

Another possible solution is to use the open-sourced SVG coder, like https://github.com/SDWebImage/SDWebImageSVGNativeCoder

kekko7072 commented 7 months ago

Ok clear. What is the minimum version supported by this package?

Because the real device where it's not working is an iPhone 8 with iOS 16.7.2 (Last Version available for this device).

dreampiggy commented 7 months ago

It use adobe svg-native parser, so I think, any version (Yes). Currently iOS 9+ Readme: https://github.com/SDWebImage/SDWebImageSVGNativeCoder