Could not find iPhone X simulator

Posted lude1994

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Could not find iPhone X simulator相关的知识,希望对你有一定的参考价值。

技术图片

 

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‘)) // 替换(修改)成这条

技术图片

 

以上是关于Could not find iPhone X simulator的主要内容,如果未能解决你的问题,请参考以下文章

Could not find ‘json‘ (>= 1.5.1) among 45 total gem(s)

Could not find iPhone 6 simulator

React-Native: Could Not find iPhone 6 Simulator问题

React-Native: Could Not find iPhone 6 Simulator问题

低版本Xcode 出现could not find developer disk image问题

ios 真机调试报错could not find developer disk image