My buddy Dan Drzimotta showed me a really cool way to convert any svg to pdf using the following tools.

First install the svg2pdf library.

> brew install svg2pdf

Setup Automator

Then startup automator and create the following script.

Screen Shot 2018-09-11 at 11.01.52 AM.png

Screen Shot 2018-09-11 at 11.01.57 AM.png

Screen Shot 2018-09-11 at 11.02.10 AM.png

Save this (i.e. svg2pdf). Then find a svg file in your finder and convert it by right clicking on it. You will now have a pdf output into that directory.

Import into Xcode

Xcode will now scale pdfs to various resolutions. To use a pdf as an image asset drag it into your assets folder and make the following changes on the image in the inspector.

Screen Shot 2018-09-11 at 10.48.58 AM.png

Screen Shot 2018-09-11 at 10.49.18 AM.png

Advertisements