Skip to content

Instantly share code, notes, and snippets.

@alwx
Last active July 4, 2018 16:19
Show Gist options
  • Save alwx/ee41d5bf972cd224e5e666b18eef2953 to your computer and use it in GitHub Desktop.
Save alwx/ee41d5bf972cd224e5e666b18eef2953 to your computer and use it in GitHub Desktop.

The easiest way

1. Clone the repository

git clone https://github.com/status-im/status-react
cd status-react

2. Install the dependencies

We created a special script that installs everything Status needs. Just run it:

script/setup

This script prepares and installs the following:

  • Homebrew
  • Java 8 from Homebrew
  • Clojure and Leiningen
  • Node.js and Yarn (see note below)
  • React Native CLI and Watchman
  • Android SDK
  • Maven
  • Cocoapods

Running development processes

After you installed all the dependencies, you need to run two processes — the build process and React Native packager. Keep both processes running when you develop Status.

1. Build process

Just run this command in the first terminal window:

clj -R:repl build.clj figwheel --platform ios,android --ios-device simulator --android-device genymotion --nrepl-port 3456

This command starts the compilation of ClojureScript sources and runs re-frisk (a tool for debugging).

For additional information check the following:

2. React Native packager

Do this in the second terminal window:

react-native start

Build and run the application itself!

1. iOS

There are two ways of running Status on iOS:

  1. From XCode. Just open ios/StatusIm.xcworkspace in XCode, select a device/simulator and click Run.
  2. From console. react-native run-ios should work.

2. Android

WIP: Install SDK, react-native run-android, etc

Optional: Advanced build notes

Node.js and Yarn

There are several ways of installing Node.js on your machine. One of the most convenient and easy is by using Node Version Manager (nvm). However, our setup script installs node from Homebrew if nvm is not installed on your machine.

That's why we suggest to install nvm first if you want to have more flexible development environment.

If nvm is already installed, scripts/setup simply does the following:

nvm install 9
nvm alias status-im 9
nvm use status-im
@rachelhamlin
Copy link

rachelhamlin commented Jun 21, 2018

Commenting here because this is a great edit of the current guide and I'll refer back to it: we should mention that you need to clone the repo before running scripts/setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment