git clone https://github.com/status-im/status-react cd status-react
We created a special script that installs everything Status needs. However, this script works only
for macOS and Ubuntu Linux. If you use another Linux distribution, please, install all dependencies manually (you can find the list below).
It’s also better to make sure that you have Node Version Manager installed before running this script.
The reason is simple — NVM provides much more flexibility and allows to have several NPM versions installed.
Just run this to install all dependencies:
This script prepares and installs the following:
- Java 8 (from Homebrew on Mac and from
- Clojure and Leiningen
- Node.js (see note below)
- yarn 1.12.3
- React Native CLI and Watchman
- Android SDK
- Android NDK r10e (under
Note 1: It can take up to 20 minutes depending on your machine and internet connection speed.
Note 2: If you don’t have
node@10 will be installed from Homebrew.
If you don’t have
nvm AND already have
node installed on your machine then nothing will happen.
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.
Just run one of these commands in the first terminal window:
make startdev-ios-simulator make startdev-ios-real make startdev-android-avd make startdev-android-genymotion make startdev-android-real
By doing this you will start the compilation of ClojureScript sources and run re-frisk (a tool for debugging).
For additional information check the following:
Do this in the second terminal window:
If you wish to specify the simulator, just run
make run-ios SIMULATOR="iPhone 7".
You can check your available devices by running
xcrun simctl list devices from the console.
You can also start XCode and run the application there. Execute
open ios/StatusIm.xcworkspace, select a device/simulator and click Run.
Note: Of course, you need to install XCode first in both cases. Just go to Mac AppStore to do this.
Installation script installs Android NDK, but you still need to install Android SDK manually to build and run Status on Android.
The easiest way to do this is to install Android Studio — it will install almost everything for you.
There is a difficult way for those who don’t want/need Android Studio.
In this case you have to do the following:
- Install Android SDK from you package manager (
brew install android-sdk,
sudo apt-get install android-sdk, …) or download it manually here;
- Add several env variables to your profile (.bashrc, .zshrc, …) — installer should say what are these variables and their values;
android update sdk --no-uito update SDKs;
sdkmanagerfrom your machine and install the latest Android SDKs;
- Optional: If you want to use AVD (Android Virtual Device, emulator), please, check this documentation;
- Optional: If you don’t like AVD, you can also use Genymotion;
android-sdk-16 not found usually mean that you simply need to install missing SDKs. Run
sdkmanager for that.
Check the following docs if you still have problems:
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 installing
nvm first if you want to have a more flexible development environment.
nvm is already installed,
make setup simply does the following:
nvm install 10 nvm alias status-im 10 nvm use status-im
Some developers prefer to use Android SDK integrated in Android Studio. Of course, it doesn’t matter
for the build process — just make sure that
ANDROID_SDK_ROOT points to a right location and you have all the SDKs installed.
If you need to test a mobile build with a custom locally built status-go dependency, you can build it by following this process:
- Ensure the
STATUS_GO_HOMEenvironment variable is set to the path of your local status-go repo (see Build status-go page for more information on requirements);
- From the root of the status-react repo, run
scripts/bundle-status-go.sh <platform>, where
- This will generate a build artifact under the status-react repo, and will be considered prioritary in the dependencies until it is deleted (e.g. by running
NOTE: Desktop builds currently always download and build status-go locally.
E.g. if you want to check existing accounts in the device, run this function in the REPL:
(get-in @re-frame.db.app-db [:accounts/accounts])
Assuming re-frisk is running in port 4567, you can just navigate to http://localhost:4567/ in a web browser to monitor app state and events.
Some developers are experiencing errors compiling for iOS on Xcode 10 on MacOs Mojave:
error: Build input file cannot be found: 'status-react/node_modules/react-native/third-party/double-conversion-1.1.6/src/cached-powers.cc'
To fix similar errors run the following commands:
make clean cd ios pod update cd .. cd node_modules/react-native/scripts && ./ios-install-third-party.sh && cd ../../../ cd node_modules/react-native/third-party/glog-0.3.4/ && ../../scripts/ios-configure-glog.sh && cd ../../../../
Now you should be able to compile again. The issue reference is here.
Some developers see the error
Exception in thread "main" java.lang.NoSuchFieldError: VAR, compiling:((..)/status-react/build.clj:1:1) when running the
clj -R:dev buid.clj watch command (e.g., via
This happens when you are running an earlier version of Clojure that is incompatible with
cljs.build.api. The solution is to upgrade to the latest version of Clojure. E.g., for macOS
$ brew upgrade clojure ==> Upgrading 1 outdated package: clojure 126.96.36.1992 -> 188.8.131.527