Is there any way to convert a CAShapeLayer to a SVG image and export it in Swift?
CAShapeLayer
A shape layer contains a CGPath. I searched on "convert CGPath to SVG" and found this (rather old) post that demonstrates converting a CGPath to an SVG:
https://stackoverflow.com/a/22213852/205185