README
react-native-environmental
Less intrussive tool to manage many environment variables accross any part in a React Native Project.
Installation
npm install react-native-environmental
Usage
add .env's (.env.
reference to .env variables from code
BuildConfig.<env var>
ios create Config.xcconfig create new scheme
point, on every step, "Build Configuration" to "Config"
preaction build
set 'Provide build setting from' with the current target
. "${SRCROOT}/../node_modules/react-native-environmental/ios/envCopy.sh" "<whatever>"
postaction build
set 'Provide build setting from' with the current target
. "${SRCROOT}/../node_modules/react-native-environmental/ios/envCopyFinish.sh"
reference to .env variables from configuration
${<env var>}
reference to .env variables from code
[[[NSBundle mainBundle] objectForInfoDictionaryKey:@"ENV_VAR_<env var>"] UTF8String]
react-native run-android --variant=
react-native run-ios --scheme "
License
MIT
PRODUCT_BUNDLE_IDENTIFIERx