From 2a43487faa2d9e8ffebc63cfa46ad37bd9e11668 Mon Sep 17 00:00:00 2001 From: Christine Abernathy Date: Fri, 28 Oct 2016 18:33:55 -0700 Subject: [PATCH] Fix Xcode build error on non-standard setup Summary: This change is related to https://github.com/facebook/react-native/issues/9677 that can happen when trying to get an Xcode release build, which in turn calls `react-native-xcode.sh` and if one has a non-standard file setup, ex: ``` ios/ |_ (iOS related code) js/ | |_ index.ios.js node_modules package.json (other React Native JS code) ``` The error output in this case is: ``` + DEST=/Users/caabernathy/Library/Developer/Xcode/DerivedData/Mixer-ffglwypovddbciahtlducaeuqxqa/Build/Products/Release-iphonesimulator/Mixer.app + [[ Release = \D\e\b\u\g ]] + BUNDLE_FILE=/Users/caabernathy/Library/Developer/Xcode/DerivedData/Mixer-ffglwypovddbciahtlducaeuqxqa/Build/Products/Release-iphonesimulator/Mixer.app/main.jsbundle + node /Users/caabernathy/Facebook/OpenSource/Apps/RWMixer/Sample/Build/Mixer-Challenge/js/node_modules/react-native/local-cli/cli.js bundle --entry-file index.ios.js --platform ios --dev false --reset-cache --bundle-output /Users/caabernathy/Library/Developer/X Closes https://github.com/facebook/react-native/pull/10262 Differential Revision: D4100083 Pulled By: lacker fbshipit-source-id: 476f38990d09d5c26c22df77630b1a71b42959e2 --- react-native-xcode.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react-native-xcode.sh b/react-native-xcode.sh index a27d2dbe..d3a7e23b 100755 --- a/react-native-xcode.sh +++ b/react-native-xcode.sh @@ -34,7 +34,7 @@ esac REACT_NATIVE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" # Xcode project file for React Native apps is located in ios/ subfolder -cd .. +cd ${REACT_NATIVE_DIR}/../.. # Define NVM_DIR and source the nvm.sh setup script [ -z "$NVM_DIR" ] && export NVM_DIR="$HOME/.nvm"