SwiftDraw can convert a single SVG into a custom SF Symbol package that can be imported into Xcode. It expands strokes and winds paths using the non-zero rule.
Basic Generation
$ swiftdraw key.svg --format sfsymbol
Generating Variants
You can provide explicit SVG files for --ultralight and --black variants:
$ swiftdraw key.svg --format sfsymbol --ultralight key-ultralight.svg --black key-black.svg
Auto-generating Weight Variants
If you don't have explicit variant files, you can synthesize them by scaling the stroke-width:
$ swiftdraw key.svg --format sfsymbol --ultralight-stroke-width 50% --black-stroke-width 2.0
Alignment and Insets
By default, SwiftDraw aligns content to template guides. You can specify custom insets using --insets top,left,bottom,right or use auto:
$ swiftdraw simple.svg --format sfsymbol --insets 40,auto,40,auto
Note: Variants can also be aligned using --ultralight-insets and --black-insets.