title: React Native Build Commands Failed: PhaseScriptExecution ... (domain=NSPOSIXErrorDomain, code=2)
body: <p><strong>Environment</strong></p>
  
  <pre><code>Mac OS X Version 10.11.3 (15D21)
  Xcode Version 7.2 (7C68)
  Simulator Version 9.2 (SimulatorApp-643)
  react-native-cli 0.1.10
  node v5.5.0
  </code></pre>
  
  <p><strong>What I did before running the app</strong></p>
  
  <pre><code>npm install -g react-native-cli
  react-native init DemoProjectDELETEME
  cd ./DemoProjectDELETEME
  react-native run-ios
  </code></pre>
  
  <p>I am new to <strong>React Native</strong>. When I try to run the default app on iOS simulator I got the following errors. I found a similar issue but it does not solve my problem.</p>
  
  <p><a href="https://stackoverflow.com/questions/24233589/xcode6-cant-run-any-app-in-simulator-domain-nsposixerrordomain-code-3">Xcode6 can&#39;t run any app in simulator ( Domain = NSPOSIXErrorDomain, Code = 3 )</a></p>
  
  <p>After restart the machine and simulator the issues still persistent.</p>
  
  <pre><code>** BUILD FAILED **
  
  
  The following build commands failed:
      PhaseScriptExecution Run\ Script /Users/x/Desktop/DemoProjectDELETEME/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/React.build/Script-006B79A01A781F38006873D1.sh
  (1 failure)
  Installing build/Build/Products/Debug-iphonesimulator/DemoProjectDELETEME.app
  An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
  Failed to install the requested application
  An application bundle was not found at the provided path.
  Provide a valid path to the desired application bundle.
  Print: Entry, ":CFBundleIdentifier", Does Not Exist
  /Users/x/Desktop/DemoProjectDELETEME/node_modules/promise/lib/done.js:10
        throw err;
        ^
  
  Error: Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/DemoProjectDELETEME.app/Info.plist
  Print: Entry, ":CFBundleIdentifier", Does Not Exist
  
      at checkExecSyncError (child_process.js:464:13)
      at Object.execFileSync (child_process.js:484:13)
      at _runIOS (runIOS.js:77:34)
      at runIOS.js:24:5
      at tryCallTwo (/Users/x/Desktop/DemoProjectDELETEME/node_modules/promise/lib/core.js:45:5)
      at doResolve (/Users/x/Desktop/DemoProjectDELETEME/node_modules/promise/lib/core.js:200:13)
      at new Promise (/Users/x/Desktop/DemoProjectDELETEME/node_modules/promise/lib/core.js:66:3)
      at Array.runIOS (runIOS.js:23:10)
      at Object.run (/Users/x/Desktop/DemoProjectDELETEME/node_modules/react-native/local-cli/cli.js:86:13)
      at Object.&lt;anonymous&gt; (/usr/local/lib/node_modules/react-native-cli/index.js:73:7)
  </code></pre>
  
  <p>Got the follower error when I am trying to launch the app from Xcode.</p>
  
  <p><a href="https://i.stack.imgur.com/xfZi9.png" rel="noreferrer"><img src="https://i.stack.imgur.com/xfZi9.png" alt="enter image description here"></a></p>
  
  <p><code>sudo npm start</code> in project root solves the issue, but <code>react-native run-ios</code> still <strong>BUILD FAILED</strong>.</p>
  
  <p>Thanks for your time viewing my question.</p>