The following instructions apply to the mobile apps for iOS and Android built in React Native. Download the iOS version here and the Android version here. Source code can be found at https://github.com/mattermost/mattermost-mobile.
If you run into any issues getting your environment set up, check the Troubleshooting section at the bottom for common solutions.
A macOS computer is required to build the Mattermost iOS mobile app.
Install the following prerequisite software to develop and build the iOS or Android apps. For macOS, we recommend using Homebrew as a package manager.
This includes NPM which is also needed. Currently version 10.11.0 is recommended with npm 6.4.1. 11.x is not working.
$ brew install node
$ brew install watchman
react-native-cli tools Use npm to install React Native CLI Tools globally (minimum required version is 2.0.1)
$ npm -g install react-native-cli
bundler --version 2.0.2 gem $ sudo gem install bundler --version 2.0.2
We use GitHub to host the source code so we recommend that you install Git to get the source code. Optionally, you can also contribute by submitting pull requests. If you do not have git installed you can do so with Homebrew by opening a terminal and executing:
$ brew install git
Some distributions come with git preinstalled but you’ll most likely have to install it yourself. For most distributions the package is simply called git
gem method. You’ll need it to install the project’s iOS dependencies. (required version is 1.7.5)Make sure you have the following ENV VARS configured:
- ANDROID_HOME to where Android SDK is located (likely /Users/<username>/Library/Android/sdk or /home/<username>/Android/Sdk)
- Make sure your PATH includes ANDROID_HOME/tools and ANDROID_HOME/platform-tools
On Mac, this usually requires adding the following lines to your ~/.bash_profile file:
export ANDROID_HOME=$HOME/Library/Android/sdk
export PATH=$ANDROID_HOME/emulator:$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools:$PATH
Then reload your bash configuration:
source ~/.bash_profile
On Linux the home folder is located under /home/<username> which results in a slightly different path
export ANDROID_HOME=/home/<username>/Android/Sdk
export PATH=$ANDROID_HOME/platform-tools:$PATH
export PATH=$ANDROID_HOME/tools:$PATH
Then also relead you configuration
source ~/.bash_profile
~/.zshrc. Adjust this accordingly.In the SDK Manager using Android Studio or the Android SDK command line tool, ensure the following are installed
SDK Tools (you may have to click “Show Package Details” to expand packages)

SDK Platforms (you may have to click “Show Package Details” to expand packages)

In order to develop and build the Mattermost mobile apps you’ll need to get a copy of the source code. Forking the mattermost-mobile repository will also make it easy to contribute your work back to the project in the future.
Fork the mattermost-mobile repository on GitHub.
Clone your fork locally:
git clone https://github.com/<username>/mattermost-mobile.git if you want to use HTTPS, or git clone git@github.com:<username>/mattermost-mobile.git if you want to use SSH<username> refers to the username or organization in GitHub that forked the repository
Change the directory to mattermost-mobile.
cd mattermost-mobile
Run make pre-run in order to install all the dependencies.