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. 最最後不行就重啓電腦吧,有時候真的就起做用了
相關文章
相關標籤/搜索