Xcode 11 Upgrade | Could not find iPhone X simulator | XRPackageModel 9.0.omo

你说的曾经没有我的故事 提交于 2019-12-21 01:27:13

问题


Anyone else getting this since upgrading from Xcode 10.3 to Xcode 11 when running react-native run-ios and any idea to get back up and running?

CoreData: annotation:  Failed to load optimized model at path '/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/Frameworks/InstrumentsPackaging.framework/Versions/A/Resources/XRPackageModel.momd/XRPackageModel 9.0.omo'
error Could not find iPhone X simulator

回答1:


I remember this happening before and amending:

node_modules⁩ ▸ ⁨@react-native-community⁩ ▸ ⁨cli⁩ ▸ ⁨build⁩ ▸ ⁨commands⁩ ▸ ⁨runIOS⁩ ▸ findMatchingSimulator.js

As a current workaround, updating:

if (simulator.availability !== '(available)' && simulator.isAvailable !== 'YES') {
  continue;
}

To:

if (simulator.availability !== '(available)' && simulator.isAvailable !== true) {
  continue;
}

Seems to get me back up and running.

Hopefully this gets updated pronto.


"react-native": "^0.59.3"




回答2:


You can change the default simulator to use.

react-native run-ios --simulator="iPhone 11 Pro Max"




回答3:


Xcode 11 can't see iPhoneX or Other Simulator - First need to add new Simulator - Then click on the bottom left of the Simulator then choose device you wanna add 😎




回答4:


Open xcode and go to window > Device and Simulators... go to the Simulators tab and click the + in the bottom left, here you can add iphone X.




回答5:


The problem is that you are using a @react-native/cli version that doesn't detect XCode 11 simulators. You can either downgrade your XCode or install a @react-native/cli that supports it.

If you are not managing the version of @react-native/cli directly in your package.json you can simply remove your package-lock.json or yarn.lock file and install it again:

rm yarn.lock 
yarn install

or

rm package-lock.json
npm install


来源:https://stackoverflow.com/questions/58060484/xcode-11-upgrade-could-not-find-iphone-x-simulator-xrpackagemodel-9-0-omo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!