This document is the entry point for developers of Status. This guide is for anyone who is interested in building, developing, debugging or submitting a bug report, pull request or contributing to Status with code.
This guide is written with OS X in mind.
- 1 Build and Run
- 1.1 Requirements
- 1.2 Dependencies & Setup
- 1.3 Building Status for Development
- 1.4 Building Status for Release
- 1.5 Building Status with the checked-out version of status-go
- 1.6 Updating the status-go dependency in status-react
- 2 Access Geth on Device
- 3 Contributing
- 4 Repository Overview
Build and Run
RequirementsNote: You should be able to build all of the requirements by running the setup script:
5.6.0, downgrade it to
npm install -g [email protected]
If that doesn't work for some reason, the manual steps are listed below for reference.
- Homebrew +
brew update(optional, for OS X) +
brew tap caskroom/cask. For Windows use Chocolatey.
- Node & NPM
brew install node watchman
brew install leiningen
npm install -g react-native-cli
- Latest JDK
brew cask install java
- Android SDK with build tools version 23.0.1 [Mac]
brew cask install android-sdkor Windows/Linux
- Genymotion (optional, you may use an Android Virtual Device or real device)
- Setup Android SDK/emulator environment
- GIT over SSH, please add public key to Github
brew install maven
- For Windows, Ruby
choco install ruby
sudo gem install cocoapods -v 1.3.1.
Android Manual Setup Steps
The following instructions were verified on an Ubuntu 14.04.1 system. (On Mac, per that old react-native doc, if you installed the SDK via Homebrew, ANDROID_HOME should be `/usr/local/opt/android-sdk`, otherwise
~/Library/Android/sdk. Aside from that, the following instructions should all still apply.)
First, download the Android SDK. When you go looking for the download, it will likely be bundled with the Android Studio IDE, but that is not required to run Status. You can dig for "Download Options", then "Get just the command line tools", and download the `sdk-tools-linux-NNN.zip`.Then:
mkdir -p ~/Android/Sdk cd ~/Android/Sdk wget https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip unzip sdk-tools-linux-3859397.zip export ANDROID_HOME=`pwd` $ANDROID_HOME/tools/bin/sdkmanager --install platform-tools emulator 'system-images;android-26;google_apis;x86' $ANDROID_HOME/tools/bin/avdmanager --verbose create avd --name Status --device pixel_xl --package system-images\;android-26\;google_apis\;x86 --tag google_apis $ANDROID_HOME/tools/emulator -avd Status -skin "1440x2560" export PATH=$ANDROID_HOME/platform-tools:$PATH export ANDROID_NDK=$ANDROID_HOME/ndk-bundle
After the above, you can follow the Building Status for Development directions below.
Note that once you run
make setup or run the Android Studio IDE, a file will be created at
status-react/android/local.properties. If such a file exists, the
status-react build scripts will ignore the
ANDROID_NDK environment variables, relying solely on the paths in that file. If this file is used, be sure that it includes both sdk.dir and ndk.dir, otherwise
make run-android will fail with an unclear error message.
Windows-specific Setup Notes
Setting up a development instance in Windows requires some tweaks. Consider the following before attempting the following sections:
- Make sure you run everything in a elevated command prompt (Right-click a link to Cmd.exe or Cygwin and click 'Run as Administrator')
- Do not use the ./re-natal symlink. Write your own
re-natal.shscript that uses full relative paths, give it execution permissions with
chmod +x, and use it instead. Script:
#!/usr/bin/env node require('coffee-script/register'); require('./node_modules/re-natal/index.js');
- In the root
npm installcommands (except for
npm install -gglobal commands) should be done as follows, to avoid windows symlink problems:
npm install --no-bin-links
- Do not use Cygwin for
npm installcommands, use cmd.exe.
- React-native is not bug-free. If you run into an error like
error: bundling: UnableToResolveError: Unable to resolve module..., the guaranteed solution is to manually edit the
require()statements to the full relative path. E.g.
(crypt = require('crypto'))becomes
(crypt = require('../../../../node_modules/crypto/package.json')).
Linux-specific Setup Notes
scripts/setup does not implement the Android SDK setup for Linux, so you will need to do this manually (the Android NDK is installed automatically though, if not referenced in the `android/local.properties` file). See Android Setup Notes.
Dependencies & Setup
$ git clone [email protected]:status-im/status-react.git -b develop && cd status-react $ make setup
Building Status for Development
$ make startdev-<target>-<device> # (replace <target> with android and <device> with genymotion, real or avd) # or # (replace <target> with ios and <device> with simulator or real) 'wait for "Prompt will show when Figwheel connects to your application" and run in another terminal' # if you're running for Android make sure device is connected $ make run-<target> # (replace <target> with ios or android)
Building Status for Release
# fill in store file properties in android/gradle.properties $ make release-android # for iOS, run make release-ios and build in Xcode
Building Status with the checked-out version of status-go
# Build status-go locally and put the package in status-react. # As long as this package is present, the build process will use it # instead of downloading the artifact # # NOTE: Assumes STATUS_GO_HOME and STATUS_REACT_HOME environment variables are defined # # full-prod-build builds status-go locally, builds status-react with it, and finally deletes local copy # $ make full-prod-build
Updating the status-go dependency in status-react
The status-go artifact is hosted in artifactory and referenced by both the Android and iOS projects in status-react. In order to update to a new status-go version, follow these steps:
- Navigate to Jenkins at https://jenkins.status.im/job/status-go/job/status-go-manual/ (only available to core contributors);
- Start a parameterized build by pressing "Build with Parameters";
- Select the branch to build (default is
- When the build finishes, the build will be announced in #jenkins channel in Slack;
- Take note of the name of the artifact, normally composed of the branch name and the first characters of the commit SHA1 (
- In the root of the react repo, run
scripts/update-status-go.sh <artifact-name>, e.g.
update-status-go.sh develop-g12345678. This will update the manifest files to reference the new status-go artifact in artifactory.
Access Geth on Device
Please make sure your contributions adhere to our coding guidelines:
- Read our own Clojure Style Guide
- Code must be idiomatic Clojure, please refer to the style guidelines (i.e. use
lein cljfmt check).
- Code must be documented.
- Pull requests need to be based on and opened against the
- Commit messages should be prefixed with the root namespace(s) under
status-imthat they modify.
- e.g. "contacts, ios: add contact stylistic changes"
Only Github is used to track issues. (Please include the commit and branch when reporting an issue.)
Overv.io is used to overview issues in multiple repositories.
lein cljfmt check before contributing.
Branch format must be under
CATEGORY/PLAIN-TEXT-#ISSUE_NUMBER acceptable branches are;
The following categories are: -
feature/ for implementation of features -
bug/ for fixing bugs -
tests/ for unit/UI tests -
experiment/ for non-features -
wip/ for longer lived branches -
junk/ for irrelevant/soon-to-be-deleted branches
Pull Requests should by default use the
develop branch as a base. The
master branch is kept stable and
develop is periodically merged there. Tags are used for releases. Each Pull Request must be rebased against
develop and squashed into a single commit.
Commit message should help understand why (and what) has been fixed. Add a summary as first line if the message is too long. When fixing bugs the first line should be prefixed with
As a good practice message starts with capitalized verb in the imperative mood.
Fork the repository on Github's web UI.Clone your fork. Add the upstream as a remote.
$ git clone [email protected]:<you>/status-react.git $ git remote add upstream [email protected]:status-im/status-react.git
originpointing to your fork and
upstreampointing to the shared repo.
$ git fetch --all
Then isolate the bug/feature work you will do into a topic branch
$ git checkout -b bug/missing-contact-116 upstream/develop
Keep your branch fresh against upstream
$ git fetch upstream $ git rebase upstream/develop
If multiple people are working on the same feature branch don't forget to also
$ git rebase upstream bug/missing-contact-116
When you are ready to make your pull request
$ git push origin
After PR has been reviewed do a final cleanup and squash your commit
$ git rebase -i upstream/develop $ git push -f origin
The Status application is divided into 3 core repositories;