Table of Contents
- 久しぶりにReactNativeを実行したらシュミレーターが起動しなくなった。
環境
- react-native : 0.57.3
- Xcode : 10.2.1
iOSの実行する
react-native run-ios
Found Xcode workspace AwesomeProject.xcworkspace
Could not find iPhone X simulator
Error: Could not find iPhone X simulator
at Promise.then.udid.udid (/Users/hogeUser/workspace/AwesomeProject/node_modules/react-native/local-cli/runIOS/runIOS.js:149:13)
at new Promise (<anonymous>)
at runOnSimulator (/Users/hogeUser/workspace/AwesomeProject/node_modules/react-native/local-cli/runIOS/runIOS.js:134:10)
at Object.runIOS [as func] (/Users/hogeUser/workspace/AwesomeProject/node_modules/react-native/local-cli/runIOS/runIOS.js:106:12)
at /Users/hogeUser/workspace/AwesomeProject/node_modules/react-native/local-cli/cliEntry.js:117:22
解決作
https://github.com/facebook/react-native/issues/21498#issuecomment-476621627
https://qiita.com/ryunosuke0922/items/614052bd39c0e05a93bf
/Users/hogeUser/workspace/AwesomeProject/node_modules/react-native/local-cli/runIOS/findMatchingSimulator.js
L.44
修正前
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のバージョンアップをしよう。