Published in


Tutorial: From Sketch to Xcode — Using Capacitor.js

Breaking news!

Companion tutorial video

Thanks Richard 😺🧡

So, what’s Capacitor one may ask?

This is my workflow for this tutorial. You can of course also export this for Android but I’m not covering it.

Final build

Tutorial requirements

Install these first

xcode-select —install
sudo gem install cocoapods
Whatever gems are I’m up for it 💎😺

Get your Sketch2React HTML ready

Capacitor project requirements

1. How to create a package.json file from scratch

npm init

2. How to create a separate directory for web assets

3. Must have an index.html file

This is how your project folder should look like before installing Capacitor.js

Installing Capacitor

Step 1 — Installing the Capacitor client

This command installs Capacitor to your project folder — neat!
npm install @capacitor/core@next @capacitor/cli@next

Step 2 — Naming your app

This command prompts you to name your app and other important thingies
npx cap init
The built-in instructions are great, read them

Step 3 — Adding your web directory

Step 4 — Installing iOS project

npm install @capacitor/ios@next
npx cap add ios
No one is perfect

Step 5 — Opening up the iOS project in Xcode

Like eating magical beans
npx cap open ios
Aaah will you look at that

Step 6 — Fix those Xcode warnings

Step 7 — Run the app!

Updating your HTML

npx cap copy


Design to code software super bundle



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store