如今在用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
殺死全部模擬器進程ios
$ sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService
xcode
設置正確的Xcode路徑app
$ sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
ui
若是不起做用,重置全部模擬器code
$ xcrun simctl erase all
進程
找到ios文件夾中全部的findmatchingsimulator.js開發
if (!version.includes('iOS') && !version.includes('tvOS')) { continue; }
將上面的IOS
換爲com.apple.CoreSimulator.SimRuntime.iOS
,tvOS
換爲com.apple.CoreSimulator.SimRuntime.tvOS
it
Delete Xcode in Launchpad.
Clean ~/Library/Developer folder.
Open the App Store, the Xcode APP button will be "Open".
Open it.