exyte / Macaw

Powerful and easy-to-use vector graphics Swift library with SVG support
MIT License
6k stars 552 forks source link

SWXMLHash 6.0.0 Compatibility #769

Open jminutaglio opened 2 years ago

jminutaglio commented 2 years ago

SWXMLHash 6.0.0 renames the main class from SWXMLHash to XMLHash.

This impacts Macaw in SVGParser -> parse()

changing to (lines 135-150) resolves:

    fileprivate func parse() throws -> Group {
        let config = XMLHash.config { config in
            config.shouldProcessNamespaces = true
        }
        let parsedXml = config.parse(xmlString)

        var svgElement: XMLHash.XMLElement?
        for child in parsedXml.children {
            if let element = child.element {
                if element.name == "svg" {
                    svgElement = element
                    try prepareSvg(child.children)
                    break
                }
            }
        }
NeedNap commented 2 years ago

The same happens to me

silvansky commented 2 years ago

SWXMLHash version should be locked in podspec file until 6.0.0 is supported.

razon30 commented 2 years ago

Facing the same issue.

MaxenceMax commented 2 years ago

Same issue here