Could not find iPhone X simulator Error: Could not find iPhone X simulator at resolve (/Users/zhouenxiao/Desktop/MeiTuan/node_modules/react-native/local-cli/runIOS/runIOS.js:149:13) at new Promise (<anonymous>) at runOnSimulator (/Users/zhouenxiao/Desktop/MeiTuan/node_modules/react-native/local-cli/runIOS/runIOS.js:134:10) at Object.runIOS [as func] (/Users/zhouenxiao/Desktop/MeiTuan/node_modules/react-native/local-cli/runIOS/runIOS.js:106:12) at Promise.resolve.then (/Users/zhouenxiao/Desktop/MeiTuan/node_modules/react-native/local-cli/cliEntry.js:117:22)
解决方法:进入node_modules/react-native/local-cli/runIOS/findMatchingSimulator.js
if (!version.startsWith(‘com.apple.CoreSimulator.SimRuntime.iOS‘) && !version.startsWith(‘com.apple.CoreSimulator.SimRuntime.tvOS‘)) // 替换(修改)成这条
原文地址:https://www.cnblogs.com/lude1994/p/11076196.html
时间: 2024-10-11 14:57:44