69

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.

Community
  • 1
  • 1
Hannele
  • 9,301
  • 6
  • 48
  • 68
  • 1
    To me it happened, when sometime back I opened two different Xcode app parallel. Just quitting the simulator and the Xcode and then reopening Xcode solved the issue for me. – BangOperator Aug 03 '17 at 07:15
  • 3
    Quit all versions of Xcode and Simulator completely. Re-open and run. – nodebase Aug 05 '17 at 06:37

4 Answers4

108

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!
Hannele
  • 9,301
  • 6
  • 48
  • 68
Gabriel Goncalves
  • 5,132
  • 3
  • 25
  • 34
56

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!

Umit Kaya
  • 5,771
  • 3
  • 38
  • 52
  • 1
    Just restarting the computer, running the app on an iPhone and then trying the Simulator again resolved it for me: https://forums.developer.apple.com/message/235094#235094 – skofgar Jun 11 '17 at 02:07
  • 1
    This solution fixed my issue and I too had 8.2.1 and 8.3.2 running in my mac – anoop4real Jun 21 '17 at 05:22
  • Hi, I have this same issue but there are no multiple versions in my Command Line Tools in Xcode > Preference > Locations, what else can I do? – mding5692 Feb 27 '18 at 05:59
  • Can you quit and re-launch Xcode. Will it happen again? – Umit Kaya Feb 27 '18 at 15:44
11

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

Chuck Boris
  • 1,275
  • 1
  • 11
  • 9
0

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

Deepak
  • 427
  • 4
  • 18