Friday, September 12, 2025
HomeiOS Developmentios - Why is Xcode corrupting SVG photos within the asset catalog?

ios – Why is Xcode corrupting SVG photos within the asset catalog?


In a big venture I am engaged on for a shopper, a designer supplied SVG photos that I dragged into the asset catalog in Xcode. The information look good within the finder, however they present up corrupted within the asset catalog, and manifest the identical downside when working within the iOS simulator (and presumably on machine.) In a single case the coloring is incorrect, and in one other, among the vector content material within the center “foreground” of the picture is clipped. The picture contents are appropriate on the edges, as are the contents drawn behind that clipped half.

If I as an alternative open the SVG file in Xcode utilizing the finder’s “open with” possibility, it appears appropriate.

Is Xcode’s/iOS’s skill to render SVG vector photos fragile? Are others having this downside?

The designer re-generated the picture utilizing Adobe Illustrator relatively than XD and the Illustrator model renders appropriately. Sadly the XML within the Illustrator model doesn’t have any formatting (carriage returns, indentation, and so on.) so it’s nearly unattainable to learn, and I can also’t simply examine the nice and unhealthy variations since their formatting is so radically totally different.

(Sadly the pictures are proprietary so I am unable to share the picture information.)

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments