Xcode 10.3 Installation

2020-02-04 06:45发布

问题:

Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted.

I have just been (involuntarily) upgraded to Xcode 10.3 (10G8). I'm getting the following error:

/Users/hgm/XCode/Gnosys/TGuide/TGPrep/Assets.xcassets:-1: 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

It appears that the upgrade to Xcode is incomplete.

How do I ensure a complete installation, if this is the problem?

回答1:

Restarting your computer/macOS will resolve the issue.



回答2:

Kill all simulator processes

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

Set the correct Xcode path

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

If that doesn’t work, reset all simulators

$ xcrun simctl erase all


回答3:

First, try to close any running Simulator and Xcode instances. Then, restart CoreSimulatorService.

sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService

You should now be able to build and run your app without any issues.

If not, another issue that you might encounter is that the Xcode upgrade deleted some versions of iOS. You might need to download an iOS Simulator from Xcode. I upgraded from Xcode 10.2, to 10.3, and no simulator was available.

Go to Xcode -> Preferences, and click on Components.

From there you will be able to download a version of iOS.

After the download is complete, close any running Simulator and Xcode instances again and try restarting CoreSimulatorService.

sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService


回答4:

  • Delete Xcode in Launchpad.
  • Clean ~/Library/Developer folder.
  • Open the App Store, the Xcode APP button will be "Open".
  • Open it.
  • it worked fine or me.

  • I have cleaned Xcode folder and project, but it did not work.



回答5:

I had the same issue and could only resolve it by downloading the iOS versions again (from Xcode Preferences > Components) that are used in my list of simulators. After that a rebuild (command-B) resolved the error.

In my case downloading iOS 10.3.1 was the solution, but your used versions may differ.