8、Could not find iPhone 6 simulator

对于运行react-native run-ios报错

[Info] 正在启动 React Native 包生成工具。

Scanning folders for symlinks in /Users/apple/Desktop/RN项目/RNVideo/node_modules (11ms)

Found Xcode project RNVideo.xcodeproj

CoreData: annotation:  Failed to load optimized model at path '/Applications/Xcode10.3.app/Contents/Applications/Instruments.app/Contents/Frameworks/InstrumentsPackaging.framework/Versions/A/Resources/XRPackageModel.momd/XRPackageModel 9.0.omo'

Could not find iPhone 6 simulator

这种错误只用修改react-native,local-cli,runIOS,findMatchingSimulator.js文件即可,修改内容如下,

将if (version.indexOf('iOS') !== 0) 修改成如下:

if (version.indexOf('iOS') !== 0 && !version.includes('iOS')) {

      continue;

}

if (simulator.availability !== '(available)')修改成如下:

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

        continue;

}

你可能感兴趣的:(8、Could not find iPhone 6 simulator)