Failed to find a suitable device for the type IBSimDeviceTypeiPad2x 解决方法 - Xcode

如今在用react native开发app,感受客户端真的坑很多。node

今天更新Xcode,就赶上了Build Failed,报Failed to find a suitable device for the type IBSimDeviceTypeiPad2x (com.apple.dt.Xcode.IBSimDeviceType.iPad-2x) with runtime iOS 12.4 (12.4 - 16G73) - com.apple.CoreSimulator.SimRuntime.iOS-12-4 这个错误,如下几个为解决办法react

  1. 最有效最简单的办法

杀死全部模拟器进程ios

$ sudo killall -9 com.apple.CoreSimulator.CoreSimulatorServicexcode

设置正确的Xcode路径app

$ sudo xcode-select -s /Applications/Xcode.app/Contents/Developerui

若是不起做用,重置全部模拟器code

$ xcrun simctl erase all进程

  1. 这种方法很差,由于全部的文件都在node_modules中

找到ios文件夹中全部的findmatchingsimulator.js开发

if (!version.includes('iOS') && !version.includes('tvOS')) { continue; } 将上面的IOS换为com.apple.CoreSimulator.SimRuntime.iOStvOS换为com.apple.CoreSimulator.SimRuntime.tvOSit

  1. 万能卸载大法,但试过对我没起做用

Delete Xcode in Launchpad.

Clean ~/Library/Developer folder.

Open the App Store, the Xcode APP button will be "Open".

Open it.

  1. 最最后不行就重启电脑吧,有时候真的就起做用了
相关文章
相关标签/搜索