更新 Xcode 10.2 后运行 React Native 项目出现
Could not find iPhone 6 simulator
找不到 iPhone 模拟器
在项目中的~/node_modules/react-native/local-cli/runIOS/findMatchingSimulator.js
的文件里
找到对应的文件,和对应的代码1
2
3
4
5
6
7if (!version.startsWith('iOS') && !version.startsWith('tvOS')) {
continue;
}
或者
if (version.indexOf('iOS') !== 0) {
continue;
}
将iOS
前面加上com.apple.CoreSimulator.SimRuntime
1 | if (!version.startsWith('com.apple.CoreSimulator.SimRuntime.iOS') && !version.startsWith('com.apple.CoreSimulator.SimRuntime.tvOS')) { |