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/XRPL-Labs/Xaman-App.
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 Xaman App 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.
Install NodeJS.
This includes NPM which is also needed. Currently minimum version 18.19.0
is required with yarn 10.2.3
.
- To install using Homebrew open a terminal and execute ..
$ brew install node
- Install using NVM by following the instructions here
- Download and install the package from the NodeJS website
- Install using your distributions package manager (Note that different distros provide different node versions which might be lower than 18 and may cause problems)
- Install using NVM by following the instructions here
- Download and install the package from the NodeJS website
Install Watchman. (minimum required version is 2023.12.04.00)
- To install using Homebrew open a terminal and execute ..
$ brew install watchman
- On Linux you have to build Watchman yourself. See the official Watchman guide.
- Note that you need to increase your inotify limits for watchman to work properly
- If you encounter a warning about a missing C++ compiler you need to install the c++ extension from you distros package manager (Ubuntu: g++, RHEL/Fedora: gcc-g++)
Use yarn to install React Native CLI Tools globally (minimum required version is 2.0.1)
$ yarn global add react-native-cli
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
- Install Xcode to build and run the app on iOS. (minimum required version is 12.5)
- Install Cocoapods using the
gem
method. You'll need it to install the project's iOS dependencies. (required version is >=1.10.1)
Download and install Android Studio or the Android SDK command line tools.
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
- Install NDK $ANDROID_HOME/tools/bin/sdkmanager --install "ndk;25.1.8937393"
-
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 export ANDROID_NDK_HOME=$ANDROID_SDK_ROOT/ndk/25.1.8937393
-
Then reload your bash configuration:
source ~/.bash_profile
-
On Linux the home folder is located under
/home/<username>
which results in a slightly different pathexport 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
- Note that depending on the shell your using this might need to be put into a different file such as
~/.zshrc
. Adjust this accordingly. - Also this documentation assumes you chose the default path for your Android SDK installation. If you chose a different path adjust accordingly.
- Note that depending on the shell your using this might need to be put into a different file such as
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)
- Android SDK Build-Tools 34.0.0
- Android Emulator
- Android SDK Platform-Tools
- Android SDK Tools
- Google Play services
- Intel x86 Emulator Accelerator (HAXM installer)
- Support Repository
- Android Support Repository
- Google Repository
-
SDK Platforms (you may have to click "Show Package Details" to expand packages)
- Android 11 (R) or above
- Google APIs
- SDK Platform
- For Android 7 or above -> Android SDK Platform 24 or above
- Intel x86 Atom_64 System Image
- Any other API version that you want to test
- Android 11 (R) or above
In order to develop and build the Xaman mobile app you'll need to get a copy of the source code. Forking the Xaman-App
repository will also make it easy to contribute your work back to the project in the future.
-
Fork the Xaman-App repository on GitHub.
-
Clone your fork locally:
- Open a terminal
- Change to a directory you want to hold your local copy
- Run
git clone https://github.com/<username>/Xaman-App.git
if you want to use HTTPS, orgit clone git@github.com:<username>/Xaman-App.git
if you want to use SSH
<username>
refers to the username or organization in GitHub that forked the repository -
Change the directory to
Xaman-App
.cd Xaman-App
-
Run
make npm-install
in order to install all the npm dependencies. -
Run
make pre-run
to generate needed env and install pod dependencies