シミュレータ起動の際、エラー発生
ReactNativeでiosのシミュレータを立ち上げる際に下記エラーが発生しました。
Found Xcode project ReactNativePlatform.xcodeproj
Could not find iPhone X simulator
Error: Could not find iPhone X simulator
シミュレータが無いという文言が書いてあります。
解決法
/node_modules/react-native/local-cli/runIOS/findMatchingSimulator.js
を開いて、下記記述を変更します。
前
if (!version.startsWith('iOS') && !version.startsWith('tvOS')) {
continue;
}
後
if (!version.startsWith('com.apple.CoreSimulator.SimRuntime.iOS') && !version.startsWith('com.apple.CoreSimulator.SimRuntime.tvOS')) {
continue;
}
参考
react-native run-ios returns Error: Could not find iPhone X simulator