Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/calintamas/react-native-envs-poc
Manage staging & production environments in React Native
https://github.com/calintamas/react-native-envs-poc
config environment react-native
Last synced: 12 days ago
JSON representation
Manage staging & production environments in React Native
- Host: GitHub
- URL: https://github.com/calintamas/react-native-envs-poc
- Owner: calintamas
- License: mit
- Created: 2019-02-17T09:51:21.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2021-11-05T09:05:36.000Z (about 3 years ago)
- Last Synced: 2024-10-31T13:33:32.807Z (19 days ago)
- Topics: config, environment, react-native
- Language: Objective-C
- Homepage:
- Size: 1.18 MB
- Stars: 34
- Watchers: 3
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
## react-native-envs-poc
Create staging & production environments for a react-native app, using [react-native-config](https://github.com/luggit/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:
```sh
cd fastlane
fastlane ios beta --env=production
```Also, I wrote an article that describes the whole process [here](https://around25.com/blog/manage-staging-and-production-environments-for-react-native-app/).