Xcode fails to open on my machine - OS X 10.8.2. It opens the main screen and just hangs there with the spinner spinning becoming unresponsive. If I double click a project, it just hangs sating it is loading.

I tried:

  1. Uninstalling and re-installing;
  2. Removing my project tree;
  3. Deleting some recommended preferences, most of which did not actually exist on my machine to begin with.

Things of note:

  1. This is a new computer. The first time I ran Xcode, it opened fine, though I didn't try using it. The problem appeared when I first opened an existing project.
  2. I created a new user on the machine. When that user is logged on Xcode loads successfully. Apparently it is a user settings issue.

12 Answers 12


Removing the ~/Library/Saved Application State/com.apple.dt.Xcode.savedState/directory might help as well.

  • This does not work with xcode 7+. See @adi-shavit answer.
    – Broonix
    Commented Nov 17, 2016 at 14:46
  • This does not work for me on Xcode 12.3 Commented Feb 17, 2021 at 9:14
  • Works for me perfectly, nothing other solutions don't work
    – dimazava
    Commented Mar 26, 2021 at 14:39

No need to reinstall Xcode.

Based on this: https://discussions.apple.com/thread/3830815

  1. I deleted all Xcode related "Unsaved Docs" docs found via the Finder search;
  2. I removed the ~/Library/Developer folder;
  3. Emptied the trash.

This worked for me.

  • 5
    rm -rf ~/Library/Developer/xcode worked for me. Thanks for the suggestion. Commented Sep 26, 2016 at 19:24
  • 4
    warning that this will remove all of your simulators and you will have to redownload all of them again if you clear ~/Library/Developer folder Commented Aug 25, 2019 at 22:12
  • Caveat: This is a pretty old q+a by now.
    – Adi Shavit
    Commented Aug 26, 2019 at 4:20
  • This is the goddamn solution.
    – Codetard
    Commented Nov 24, 2019 at 11:32
  • 2
    WARNING: ~/Library/Developer contains your code snippets, color themes, custom key bindings and other user preferences. Instead of completely removing the folder, I recommend moving it to another location. Commented Sep 8, 2020 at 11:37

I had a similar problem where xcode was hanging on opening one particular project. I wanted a very precise fix without having to remove all the settings. I deleted proj.xcodeproj/project.xcworkspace/xcuserdata/<user>.userdatad/UserInterfaceState.xcuserstate from the .xcodeproj folder and that solved the problem.

So if you are having Xcode hang while attempting to open one particular project, this is the file that you need to delete.

  • had also to rm -rf all proj.xc*/xcuserdatas, then it worked. Xcode 13.1, Capacitor project, YMMV & be careful with rm -rf!
    – kubi
    Commented Nov 3, 2022 at 14:32

A slightly improved answer:

I didn't need to reinstall Xcode at all, just remove the 'unsaved documents':

Search in ~/Library for Xcode (by name) (to search, you go to this folder, enter Xcode, with the drop down choose "by name", and then click the "Library delete anything matching in ~/Library/Caches or "~/Library/Autosave Information" or that looks like it might be an unsaved documents


My problem was due to iCloud. All my projects were inside documents folder which is iCloud folder. Because iCloud settings in my MacBook was with the optimize option, the content of files weren’t allocated locally in the hard drive but remotely in iCloud. That was the cause for unresponsiveness of Xcode when loading the project or even starting new one. I moved all the projects to local folder in hard disk not included as a backup for iCloud and it solved the problem.


Deleting the latest file (GPUToolsAgent.sock ) in that Xcode directory solved it.

Eds-MBP-3:echo ed$ ls -artl ~/Library/Developer/Xcode/
total 0
drwxr-xr-x   2 ed  staff   64 Apr  2  2018 DocumentationCache
drwxr-xr-x   5 ed  staff  160 Feb 28 13:49 ..
drwxr-xr-x  17 ed  staff  544 Apr 19 20:39 iOS Device Logs
drwxr-xr-x   7 ed  staff  224 Apr 29 12:18 DerivedData
drwxr-xr-x   5 ed  staff  160 Apr 29 12:40 UserData
srwxr-xr-x   1 ed  staff    0 Apr 29 13:56 GPUToolsAgent.sock
drwxr-xr-x   7 ed  staff  224 Apr 29 13:56 .
Eds-MBP-3:echo ed$ rm -f ~/Library/Developer/Xcode/GPUToolsAgent.sock 

In my case source control was enabled and that's causing this issue

preferences > Source Control > uncheck Enable source control

enter image description here


I couldn't figure out how to delete Unsaved Docs related to Xcode, so I resorted to wiping out the whole hard drive after backing up my projects to Bitbucket. It worked, but it obviously took a while. If you can figure out how to delete unsaved files related to Xcode, I'd recommend doing that first. If you can't figure out how to do that like me, or it doesn't work, wiping out your hard drive should work.

This problem was intolerable. It took away my ability to do my job so I needed to fix it and I knew this method would work.


This just happened to me when I updated an XCode Source Editor Extension.

Deleting that extension app from the Applications directory allowed XCode to start normally again.


I tried to delete:

~/Library/Developer/Saved Application State/com.apple.dt.Xcode.savedState

and once it helped. But another time it didn't help, so I also tried to reinstall Xcode, which also didn't help.

It turned out that the problem was that I was installing the app via WiFi or Bluetooth. When I connected my device via cable, the Xcode popped up to life and the "loading forever" stopped.


You can try to open another project if you have, and then open your current project

Or creating a new Swift file, then open it.
Then go back to open your current project.
That may work as well.


For me on Xcode 13.2.1 on macOS Monterey, Xcode had been hanging on startup, unrelated to any project, and none of the other answers helped.

I ended up resolving the problem by removing all Xcode Source Editor extensions: Go to System Preferences > Extensions > Xcode Source Editor, then uncheck any extensions that you may have installed.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .