sudo apt install -y git curl makeon the terminal
- macOS: Make sure you have
git clone https://github.com/status-im/status-react cd status-react
We created a special script that leverages Nix to install everything Status needs with minimal impact to the user’s system. This script has only been tested on macOS (with XCode 11.1), Ubuntu Linux 18.04, Manjaro, and Arch. If it doesn’t work for you on another Linux distribution, please install all dependencies manually (you can find the list below).
In order to make things as practical as possible, the script will auto-accept the Android SDK license agreements.
If you’re on NixOS, please run the following to ensure you have the necessary prerequisites available:
nix-env --install git gnumake
In order to work with status-react, you need to be inside a Nix shell. The makefile targets will ensure you are in a Nix shell, or start one for you implicitly. However, if you’re going to be running multiple commands on the same terminal, you might want to start a dedicated Nix shell by running
make shell TARGET=android (or using other
make shell TARGET=<os> script prepares and installs the following:
- Java 8
- Clojure and Leiningen
- Node.js (see note below)
- React Native CLI and Watchman
- Android SDK
- Android NDK
- CMake and extra-cmake-modules
- Python 2.7
- Conan (Linux-only)
Note 1: It can take up to 60 minutes depending on your machine and internet connection speed.
Note 2: An environment variable called
TARGET controls the type of shell that is started. If you want to limit the amount of dependencies downloaded, you could run
make shell TARGET=android. Most of the makefile targets already include a sensible default.
Note 3: On macOS, the build environment is set up to rely on XCode 11.1. If you want to use an unsupported version, you’ll need to edit the version in nix/mobile/default.nix file (
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.
In the first terminal window, just run:
By doing this you will start the compilation of ClojureScript sources and run re-frisk (a tool for debugging). You should wait until it shows you
Prompt will show when Figwheel connects to your application before running the React Native packager.
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 SDK and Android NDK.
- 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;
Once Android SDK is set up, execute:
Check the following docs if you still have problems:
If you need to use a branch of a status-go fork as a dependency of status-react, you can have the scripts build it.
- Make sure you are in the root of the
status-reactrepo and start a Nix shell using
make shell TARGET=android.
scripts/update-status-go.sh <rev>, where
revis a branch name, tag, or commit SHA1 you want to build.
The script will save the indicated commit hash along with other information in the
If you are using a GitHub fork of
status-go repo, export the
STATUS_GO_OWNER environment variable when running the script.
If instead you need to use a locally checked-out status-go repository as a dependency of status-react, you can achieve that by defining the
export STATUS_GO_SRC_OVERRIDE=$GOPATH/src/github.com/status-im/status-go # Any command that you run from now on # will use the specified status-go location make release-android
or for a one-off build:
make release-android STATUS_GO_SRC_OVERRIDE=$GOPATH/src/github.com/status-im/status-go
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.
Whenever the iOS NodeJS dependencies change,
make nix-update-pods should be run in order to update
Whenever the Android project changes in terms of Gradle dependencies,
make nix-update-gradle should be run in order to update
Whenever the Clojure dependencies change,
make nix-update-clojure should be run in order to update
Whenever Fastlane and its modules need updating,
make nix-update-gems should be run in order to update
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:
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.