Official Android and iOS applications for NEM2(a.k.a Catapult).
This application is built on React Native
and therefore assumes you have all the necessary CLI tools to run and manage this project. If not, please set up react native (choose tab React Native CLI Quickstart).
- The default network configuration is fetched from the
env/default.json
file, and as part of the first-time setup, you should provide these. Check theenv/default.json.example
file to see what keys are required. - Node version should be 10.xx.x [A slight limitation because of realmjs dependency]
- Hermes is disabled [because of Realm dependency]
- Android hosts 2 different product flavors -
dev
andprod
, so you will need to specify this when building/releasing the application for android. - Yarn is preferred over NPM as a package manager.
That's it. Now you can clone, build and run this project.
$ git clone <url/to/this/project>
$ cd <path/to/this/project>
$ cp env/default.json.example env/default.json # now add your network configuration
$ yarn install # or npm install
Important: Post upgrading to 0.60.5+, the react-native-cli has issues with the
run-android
command which won't start the node server on Ubuntu/linux. As a work around, you will need to start it on your own by issuing the following command.
Open a new tab and
$ react-native start # --resetCache (for a clean build)
To run,
$ react-native run-android --variant=devDebug # or react-native run-ios (if you are on macOS)
$ yarn jest # add -i if you prefer to run this in band
Important: When running test suites from a cloud environment like jenkins or circleci, make sure to copy the .env.example as .env, which you can add as a setup step, and should happen before
yarn jest
command.
Android has 2 flavors
Dev
Prod
For creating a release or debug build type, run assemble{flavorName}{buildType}
where buildType can be one of (Debug|Release)
. Visit this page for more details.
$ cd android/
$ ./gradlew assembleDevRelease # or any of `assembleDevRelease` | `assembleProdDebug` | `assembleProdRelease`
Note: apk(s) will be generated at
app/build/outputs/apk/{flavor}/{buildType}
folder depending on what flavor you built.
Install Xcode and make sure your using latest Xcode.
All new(0.60+) react native apps use Cocoapods by default, so we need that as well Install cocoapods use following steps
If you already have RubyGems, make sure it's updated to the latest version. To update it, run the following command:
$ gem update --system
Run the two commands below to install CocoaPods.
$ sudo gem install cocoapods
$ pod setup
$ cd <path/to/this/project/>
$ cd ios && pod install && cd ..
If you want to run the app on an actual physical iOS device, please follow the instructions here
Please setup your local environment for signing commits. Also, read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
We use SemVer for versioning. For the versions available, see the tags on this repository.
This project is licensed under Apache License 2.0.