I have been facing an issue where \'react-native run-ios\' can not start, regardless of the simulator I add to the --simulator argument. XCode has the correct location for t
I solved it by replacing line number 62 in YourProjectFolder/node_modules/react-native/local-cli/runIOS/findMatchingSimulator.js
This line
if (
simulator.availability !== '(available)' &&
simulator.isAvailable !== 'YES'
) {
With this one
if (
!simulator.isAvailable
) {
In some case there may be some different solutions for everyone just debug findMatchingSimulator.js file by putting console.log() so you'll know why it is not detecting simulator. In my case the xcrun simctl list devices --json
command not providing simulator.availability
and simulator.isAvailable
is not string it's bool.
I printed the simulator list which command is returning through the following line
console.log(JSON.stringify(simulator.simulatorName));
console.log(simulator.isAvailable);
console.log('-------------------------------------------------------------');
The after running command react-native run-ios --simulator="iPhone SE"
I got output in the terminal and fixed code according to console print. And my simulator was running.