- Start the app.
yarn start
- Lint the app.
yarn lint
- Test the app.
yarn test
- Install dependencies:
yarn
- Create a
.env
file in the root directory of the project, based on the.env.defaults
sample file and the extra constants that you may need.
You can also create .env.prod
and .env.staging
to define environment variables for production and staging.
- Rename your new project using react-native-rename
- Start on android or ios:
react-native run-android
orreact-native run-ios
- After adding the project to CC, go to
Repo Settings
- On the
Test Coverage
tab, copy theTest Reporter ID
- Replace the current value of
CC_TEST_REPORTER_ID
on theconfig.yml file (.circleci/config.yml)
with the one you copied from CC
- Ask a developer for the release key and place it in
/android/app
- Add the following variables in
.env.prod
:
RELEASE_STORE_FILE
RELEASE_STORE_PASSWORD
RELEASE_KEY_ALIAS
RELEASE_KEY_PASSWORD
- Run
cd android && ./gradlew assembleRelease
- The generated APK can be found under
android/app/build/outputs/apk/app-release.apk
- Configure the release scheme: go to Product -> Scheme -> Edit Scheme, then select the Run tab in the sidebar, and set the Build Configuration dropdown to Release.
By default the app loads .env
, .env.staging
or .env.prod
files depending on the mode the build was executed (debug
, staging
or release
respectively)
You can add an schema in XCode and indicate which .env
file to load there or doing it manually from the console by running
ENVFILE=.env.staging react-native run-ios