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
react-native init MyProjectyarnreact-native run-ios --device "Apple iPhone" from a Windows PC.The hello world app is installed and running on the iPhone.
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)
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.
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.
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.