alexpchin / react-native-envs-poc

create staging & production environments for a react-native app

Home Page:https://around25.com/blog/manage-staging-and-production-environments-for-react-native-app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-native-envs-poc

Create staging & production environments for a react-native app, using react-native-config.

config

// .env
IS_PRODUCTION=false
API_HOST=https://api.staging.foobar.com

// .env.staging
IS_PRODUCTION=false
API_HOST=api_host

// .env.production
IS_PRODUCTION=true
API_HOST=api_host

.env is used for the local environment, while the other two for staging and production. The setup uses schemes on iOS and buildTypes on Android.

fastlane

I'm using fastlane to automate builds & reduce the app release to a one-liner script:

cd fastlane
fastlane ios beta --env=production

Also, I wrote an article that describes the whole process here.

About

create staging & production environments for a react-native app

https://around25.com/blog/manage-staging-and-production-environments-for-react-native-app

License:MIT License


Languages

Language:Objective-C 35.7%Language:Ruby 20.2%Language:Python 19.0%Language:Java 13.8%Language:JavaScript 11.2%