react-native run-ios fails with "spawnSync xcrun ENOENT" on Windows

Created on 16 Feb 2019  路  1Comment  路  Source: facebook/react-native

馃悰 Bug Report

Doing react-native run-ios --device "Apple iPhone" from a Windows PC doesn't work.
I have my iPhone connected to my Windows PC but the command fails instantly with:
spawnSync xcrun ENOENT

To Reproduce

  1. react-native init MyProject
  2. yarn
  3. react-native run-ios --device "Apple iPhone" from a Windows PC.

Expected Behavior

The hello world app is installed and running on the iPhone.

Code Example

I'm just using a brand new hello world without any code changes.

Error:

{ windowsIos }  禄 react-native run-ios --device "Apple iPhone" --verbose
(node:21384) ExperimentalWarning: The fs.promises API is experimental
Found Xcode project windowsIos.xcodeproj

spawnSync xcrun ENOENT

Error: spawnSync xcrun ENOENT
    at Object.spawnSync (internal/child_process.js:977:20)
    at spawnSync (child_process.js:581:24)
    at Object.execFileSync (child_process.js:609:13)
    at Object.runIOS [as func] (D:\ReactNative\windowsIosExperiment\windowsIos\node_modules\react-native\local-cli\runIOS\runIOS.js:76:17)
    at Promise.resolve.then (D:\ReactNative\windowsIosExperiment\windowsIos\node_modules\react-native\local-cli\cliEntry.js:117:22)

Environment


  React Native Environment Info:
    System:
      OS: Windows 10
      CPU: (8) x64 Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
      Memory: 12.34 GB / 23.94 GB
    Binaries:
      Yarn: 1.2.1 - D:\Program Files (x86)\Yarn\bin\yarn.CMD
      npm: 5.6.0 - D:\Program Files\nodejs\npm.CMD
react-native-cli: 2.0.1
react-native: 0.58.4

If this is not supported, then the cli should make this more clear instead of actually trying to build and failing with errors.

Bug iOS Locked

Most helpful comment

You need XCode to build iOS apps. So it'll only work on a Mac and not on Windows. Pull request welcome to improve the error message though.

>All comments

You need XCode to build iOS apps. So it'll only work on a Mac and not on Windows. Pull request welcome to improve the error message though.

Was this page helpful?
5 / 5 - 1 ratings

Related issues

arunabha picture arunabha  路  3Comments

jlongster picture jlongster  路  3Comments

anchetaWern picture anchetaWern  路  3Comments

lazywei picture lazywei  路  3Comments

josev55 picture josev55  路  3Comments