Xcode 11 Upgrade | Could not find iPhone X simulat

2020-05-27 03:40发布

问题:

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:

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