Getting Started
Configuration
You should place a configuration file at the project root: <project_root>/.env. There is an example .env.example file to reference for the expected format.
The .env file has the following params:
LOG_LEVEL=DEBUG|INFO|WARN|ERROR (optional, defaults to INFO)
ENVIRONMENT_TYPE=DEBUG|STAGE|PRODUCTION (optional, defaults to PRODUCTION)
Set Up
Make sure you have a recent version of
npminstalled.Make sure
yarnis installed, e.g.npm i -g yarn.In the project root, install all the npm packages:
yarn install.For iOS, make sure you have Cocoapods installed: https://guides.cocoapods.org/using/getting-started.html
Install the pods:
cd ios, thenpod install.You can now open the
xcworkspacefile and then run the app using Xcode.For Android, you should generate your own keystore, e.g.:
keytool -genkey -v -keystore ./android/app/debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000You may need to run
yarn startin a separate terminal window to manually start Metro before running Android in debug mode.Run
yarn androidto start the app on Android device/emulator.
iOS Distribution Builds
You can use the standard approach in Xcode to make builds–nothing special is required.
Android Distribution Builds
Put a file android/app/gradle.properties with the following contents:
release_keystore=your_key_name.keystore
release_keystore_password=your_key_store_password
release_key_alias=your_key_alias
release_key_password=your_key_password
Optionally, you could pass the parameters from command-line with the -P option. For example, ./gradlew assembleRelease -Prelease_key_password=keypass.
There is a bash script that’s provided, build_android.sh, which will automate making builds (there are a few extra steps that are necessary to make the build work, which this script takes care of).