Xcode error connecting to simulator "Software caused connection abort"

XcodeIos Simulator

Xcode Problem Overview


When I try to run my project through the Xcode simulator, it keeps giving me the error "Software caused connection abort".

Tried restarting the simulator & Xcode, and I recently deleted the DerivedData folder as suggested in this post about broken playgrounds so that also didn't help.

Xcode Solutions


Solution 1 - Xcode

QUICK FIX

This is happening because you have multiple versions of Xcode installed. MacOS unfortunately only supports running one version of Xcode at a time, and it needs to know the location of the currently running version. To sort things out, choose one of the following:

Quit all instances of Xcode and restart it

Try one of the other options below if that hasn't solved it.

Using the command line:

  1. run sudo xcode-select --switch /Applications/your_custom_folder_if_needed/Xcode.app

  2. Restart your terminal and Xcode and it will work just fine.

No-command line users:

  1. Quit all instances of Xcode
  2. Start the instance of Xcode that you want to use
  3. Go to Xcode -> Preferences -> Locations
  4. Select the correct version in Command Line Tools
  5. Done!

Solution 2 - Xcode

It's due to multiple Xcode installed in your system. This is how you make it work:

  1. Quit all running Xcodes
  2. Re-launch Xcode
  3. Go to Xcode > Preferences > Locations
  4. Change to the correct version in Command Line Tools

Clean project and clear Derived data if necessary, then run!

Solution 3 - Xcode

In my case quitting and re-launching given Xcode was enough. I had two Xcodes, stable and beta.

Solution 4 - Xcode

For me, restarting the Mac OS worked (multiple times).

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionHanneleView Question on Stackoverflow
Solution 1 - XcodeGabriel GoncalvesView Answer on Stackoverflow
Solution 2 - XcodeUmit KayaView Answer on Stackoverflow
Solution 3 - XcodeChuck BorisView Answer on Stackoverflow
Solution 4 - XcodeDeepakView Answer on Stackoverflow