Fails to load SVGColors.plist when using SPM
hiltonc opened this issue · 2 comments
Steps to reproduce the issue
- Integrate PocketSVG using SPM
- Call
SVGBezierPath.paths(fromSVGString: "<?xml version=\"1.1\" encoding=\"UTF-8\" standalone=\"no\"?> <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0.000000, 0.000000, 732.000000, 185.000000\" width=\"732.000000\" height=\"185.000000\" > <path fill=\"none\" stroke=\"black\" stroke-width=\"2.000000\" stroke-linejoin=\"round\" stroke-linecap=\"round\" d=\"M148.0 143.0M300.0 143.0\" /> </svg>")
Expected: returns bezier path
Actual: Invalid parameter not satisfying: [str hasPrefix:@"#"] (NSInternalInconsistencyException)
The error suggests we got to
PocketSVG/Sources/SVGEngine.mm
Line 900 in 25268e3
PocketSVG/Sources/SVGEngine.mm
Line 886 in 25268e3
url
is nil
.
Please include all relevant code, including all PocketSVG
method calls made.
Has my issue been reported?
My issue has been reported in the following closed issues:
n/a
Specifications
- PocketSVG Version: 2.7.1
- Xcode Version: 13.1
- iOS/macOS Version: iOS 15.1
Hello @hiltonc , thanks for reporting this.
This should be fixed by #197, released in PocketSVG version 2.7.2
Please note that libxml, our XML parser, doesn't support xml v1.1. It only supports 1.0, so I think your SVG should still be parsable.
Feel free to reopen if need be
Thank you!!