react-native-config: Problems with v0.12.0 + React Native 0.61.4
Is there a migration guide from 0.11.7 to 0.12.0? What do I need to remove from the old config, and what do I need to add to the new config? Do I need this config in the Podfile?
if target.name == 'react-native-config'
phase = target.project.new(Xcodeproj::Project::Object::PBXShellScriptBuildPhase)
phase.shell_script = "cd ../../"\
" && RNC_ROOT=./node_modules/react-native-config/"\
" && export SYMROOT=$RNC_ROOT/ios/ReactNativeConfig"\
" && export BUILD_DIR=$RNC_ROOT/ios/ReactNativeConfig"\
" && ruby $RNC_ROOT/ios/ReactNativeConfig/@BuildDotenvConfig.rb"
target.build_phases << phase
target.build_phases.move(phase,0)
end
I have added a config file in ios folder called Config.xcconfig with this line: #include? “tmp.xcconfig”
I get some build errors, when I try to upgrade from 0.11.7 to 0.12.0.
I have the following:
echo “.env.test” > /tmp/envfile
Added this line to it as the guide suggests:
I get this build error:
/node_modules/react-native-config/ios/ReactNativeConfig/ReadDotEnv.rb:27:in join': no implicit conversion of nil into String (TypeError) from /node_modules/react-native-config/ios/ReactNativeConfig/ReadDotEnv.rb:27:in
read_dot_env’
from ./node_modules/react-native-config//ios/ReactNativeConfig/BuildDotenvConfig.rb:15:in `<main>’
reading env file from and writing .m to
going to read env file from root folder
About this issue
- Original URL
- State: open
- Created 5 years ago
- Reactions: 12
- Comments: 18 (1 by maintainers)
Any update on this?
hey 👋 I kindly ask to try my lib https://www.npmjs.com/package/react-native-ultimate-config if the issue persists. it works well for me in rn60+
Not sure if this helps but…
We just upgraded to the latest and had to remove plist preprocessing (this is in Build Settings).
Also, we did not need to modify the Podfile with the script @c0d3x posted above.
I have the same issue, and haven’t been able to find a workaround.
I don’t know if this will help, but I got some clarification to my comment here (see the comments that follow it as well). It is working for me, using v0.12.0 + RN 0.61.5.