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
This commit is contained in:
Christine Abernathy 2016-10-28 18:33:55 -07:00 committed by Facebook Github Bot
parent 3b0d4f4c33
commit 2a43487faa
1 changed files with 1 additions and 1 deletions

View File

@ -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"