Hasan Setiawan

Write, write, write give your wings on code!

Follow me on GitHub

React Native run-ios failed?

Try run react-native run-ios but got this error


Error: Command failed: xcrun simctl list devices
xcrun: error: unable to find utility "simctl", not a developer tool or in PATH
at checkExecSyncError (child_process.js:486:13)
at Object.execFileSync (child_process.js:506:13)
at _runIOS (runIOS.js:62:19)
at runIOS.js:24:5
at tryCallTwo (/Users/xiaoheng/AwesomeProject/node_modules/promise/lib/core.js:45:5)
at doResolve (/Users/xiaoheng/AwesomeProject/node_modules/promise/lib/core.js:200:13)
at new Promise (/Users/xiaoheng/AwesomeProject/node_modules/promise/lib/core.js:66:3)
at Array.runIOS (runIOS.js:23:10)
at Object.run (/Users/xiaoheng/AwesomeProject/node_modules/react-native/local-cli/cli.js:87:13)
at Object. (/usr/local/lib/node_modules/react-native-cli/index.js:88:7)
          

Solution

It appears to be a problem with the location of Command line tools.

Xcode > Preferences > Locations > Select your Xcode version from the dropdown and exit Xcode.