Last active
January 13, 2020 22:32
-
-
Save lucasmotta/31aa4550abec303210f8c57b7ee16d5d to your computer and use it in GitHub Desktop.
Using [email protected] with React Native >0.60
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is needed for react-native-config | |
# See more: https://github.com/luggit/react-native-config/issues/187#issuecomment-468730417 | |
post_install do |installer| | |
installer.pods_project.targets.each do |target| | |
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.ruby" | |
target.build_phases << phase | |
target.build_phases.move(phase,0) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment