Xcode Hangs at Startup

Solution 1:

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

Solution 2:

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.

Solution 3:

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.

Solution 4:

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