title: Setup of React Native using ndenv on OS X
body: <p>I'm running into PATH difficulty setting up a new React Native iOS project in Xcode 7.1.  I'm trying to use <a href="https://github.com/riywo/ndenv" rel="nofollow"><code>ndenv</code></a> to manage node versions, which means <code>~/.ndenv/shims</code> needs to be on PATH.  To that end, I have PATH set as a user-defined project setting as <code>$PATH:~/.ndenv/shims</code>.  The Xcode settings UI shows the correct expanded PATH value.</p>
  
  <p>Yet the project, generated by <code>react-native init</code>, still fails to build.  The custom build script fails to find <code>react-native</code>:</p>
  
  <p><code>../node_modules/react-native/packager/react-native-xcode.sh: line 36: react-native: command not found</code></p>
  
  <p><code>react-native</code> is installed correctly, but the environment variables dump in the build output makes clear that <code>~/.ndenv/shims</code> isn't on PATH.  My PATH settings don't appear in the build environment.  However, if I set a random user-defined setting (e.g. <code>FOOBAR=baz</code>), that <em>does</em> correctly show up in the build environment.</p>
  
  <p>That result plus further inspection of PATH in the build environment makes clear that Xcode is overriding PATH somewhere along the line.</p>
  
  <p>So in order of preference:</p>
  
  <ul>
  <li>How do I correctly append to PATH for a custom build script in Xcode 7?  </li>
  <li>Alternatively, what's the best (least hacky?) way of getting ndenv-managed npm modules on PATH for the build script?</li>
  </ul>
  
  <p>Modifying react-native-xcode.sh is out of the question, since that's a part of the external react-native npm module.</p>
  
  <p><strong>UPDATE 1</strong></p>
  
  <p>As a temporary workaround, I've bailed on ndenv and installed node via homebrew.  This puts <code>react-native</code> on the (apparently-hardcoded) Xcode path at <code>/usr/local/bin</code>, and works to get the build running.  I'm not going to submit or accept this as a solution, since it doesn't allow the repeatable control of node versions that ndenv does.</p>