react-native run-ios can not find any simulator
I've found a temporary fix:
In the following file:
/node_modules/react-native/local-cli/runIOS/findMatchingSimulator.js
...change line 42 to:
if (!version.startsWith('com.apple.CoreSimulator.SimRuntime.iOS') && !version.startsWith('tvOS')) {
Update
It is fixed in v1.9.8.
Update cli is the easy solution
npm install -g react-native-cli@latest
This issue is fixed but not released yet. https://github.com/react-native-community/react-native-cli/pull/274
So it can be solved temporarily to fix the file below.
/node_modules/react-native/local-cli/runIOS/findMatchingSimulator.js
Change this line
if (!version.startsWith('iOS') && !version.startsWith('tvOS')) {
to
if (!version.includes('iOS') && !version.includes('tvOS')) {
Do not forget apply this again when you reinstall packages.