I have follow the doc: https://github.com/luggit/react-native-config#ios
until: Availability in Build settings and Info.plist
step 6. create new build phase for the scheme which will generate "tmp.xcconfig"
before each build exposing values to Build Settings and Info.plist (this snippet has to be placed after "echo ... > tmp/envfile"
if approach explained below is used)
- I have created schema for my app then in build -> pre-actions. I click add new script and paste the following:
echo ".env.staging" > /tmp/envfile
"${SRCROOT}/../node_modules/react-native-config/ios/ReactNativeConfig/BuildXCConfig.rb" "${SRCROOT}/.." "${SRCROOT}/tmp.xcconfig"
- then I go to info.plist and use $(MYENVVAR) to get value from .env file but it could not get any value.
Has anyone ever faced it?
my package json lock is
"react-native-config": "0.11.7"
Happy to see any comments