解决Xcode 10.3安装错误:Assets.xcassets:-1: Failed to find a suitable device for the type IBSimDeviceTypeiPad2x

时间:2022-06-01 16:42:28

升级XCode到10.3时报错,错误信息如下:

: error: 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

Failure Reason: Failed to create new simulator device that matches IBSimDeviceTypeiPad2x (com.apple.dt.Xcode.IBSimDeviceType.iPad-2x) for runtime iOS 12.4 (12.4 - 16G73) - com.apple.CoreSimulator.SimRuntime.iOS-12-4 (Invalid runtime: com.apple.CoreSimulator.SimRuntime.iOS-12-4)

Underlying Errors:

Description: Invalid runtime: com.apple.CoreSimulator.SimRuntime.iOS-12-4

最终在*上找到了解决方案。

方案一:

重启MacOS电脑,问题就不知道什么原因就解决了。这是很粗暴直接的方式。

方案二:

kill掉模拟器进程,命令如下:

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

接着设置xcode path:

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

如果还不行,重启模拟器

$ xcrun simctl erase all

参考:https://*.com/questions/57155654/xcode-10-3-installation