You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-1Lines changed: 20 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,18 @@ However, due to the lack support of that third party library, which contains mas
20
20
21
21
User who use SVGKit or have to support iOS 8+(macOS 10.10+) can still use that SDWebImageSVGKitPlugin instead. You can also mix these two SVG coders at the same time. But since Apple already provide a built-in framework support, we prefer to use that instead, which can reduce complicated dependency, code size, and get polished from Apple's system upgrade.
22
22
23
+
## Note for CoreSVG framework
24
+
25
+
So far (Xcode 11.4 && iOS 13.4), the CoreSVG.framework is still in private framework. I've already send the feedback radar to ask for the public for this framework. If you want, please help us as well to fire radars as well: https://feedbackassistant.apple.com/
26
+
27
+
The CoreSVG.framework API is stable and match the same concept as CoreGraphics's PDF API, so it's no reason to keep private. And we've already submitted Apps which use the CoreSVG to render the vector images on App Store.
28
+
29
+
All the SPI access here we use the runtime access and early check, even if future OS upgrade break the function, this framework will not crash your App and just load failed. I'll keep update to the latest changes for each firmware update.
30
+
31
+
If you still worry about the SPI usage, you can use [SDWebImageSVGKitPlugin](https://github.com/SDWebImage/SDWebImageSVGKitPlugin). But we may not response to any parser or rendering issue related to [SVGKit](https://github.com/SVGKit/SVGKit), because it's already no longer maintained.
32
+
33
+
There is also another solution: [SVG-Native](https://w3c.github.io/svgwg/specs/svg-native/index.html), a new W3C standard from Adobe, which is a subset of SVG/1.1. Both Apple/Google/Microsoft already join the agreement for this standard, you can try to write your own coder with the [code from SVG-native-viewer](https://github.com/adobe/svg-native-viewer/blob/master/svgnative/example/testCocoaCG/SVGNSView.mm) and adopt SVG-native for vector images.
34
+
23
35
## Example
24
36
25
37
To run the example project, clone the repo, and run `pod install` from the Example directory first.
@@ -154,6 +166,13 @@ if svgImage.sd_isVector { // This API available in SDWebImage 5.6.0
154
166
}
155
167
```
156
168
169
+
## Compatibility for CoreSVG framework
170
+
171
+
1. The CSS `color` does not support hex syntax. Use `rgb` or `rgba` instead
This framework supports backward deployment on iOS 12-/macOS 10.14-. And you can combine both `SDWebImageSVGCoder` for higher firmware version, use `SDWebImageSVGKitPlugin` for lower firmware version.
@@ -170,7 +189,7 @@ Pay attention, you should always use the runtime version check to ensure those s
0 commit comments