Reputation: 36048
I was working with a project and I closed it because my computer was getting slow. When I tried to open my project again, Xcode quit. So every time I try to open my project I get this error:
I am not able to open my project. Is there a way I can recover my project?
Upvotes: 16
Views: 43889
Reputation: 7916
What worked for me was to remove the project from iCloud by naming its parent directory {directory}.noSync
.
To avoid data loss, this should be accompanied by hosting your project in GitHub or somewhere else.
Upvotes: 0
Reputation: 1
I had the same error and none of the above helped me.
Solution that helped me: Create a new project, then without closing it, go to
File -> Open
and select your .xcworkspace file.
Upvotes: -3
Reputation: 21
Quit Xcode, then make a copy of the xcworkspace file (just in case). In finder, right-click the xcworkspace file and choose Show File Contents.
In that directory, open the xcuserdata directory and delete any contents. Start Xcode again and open the project.
In my case there was something wrong with the saved project state, so doing this resets the state and it opened normally.
Upvotes: 1
Reputation: 119108
Turns out that double-clicking on the actual file instead of selecting it from the Welcome to Xcode window will help open the project as expected!
Also, after the first time open it with double-clicking the file, the window will be fixed by itself 🤷🏻♂️
Upvotes: 8
Reputation: 441
I was having this issue with Xcode 12. Opening Xcode, and selecting my project from 'Recent projects' list was causing Xcode to crash
My solution: I navigated to the folder and opened ProjectName.xcworkspace file, then it worked
Upvotes: 1
Reputation: 31486
Nothing mentioned above/below worked for me. Here's what I did instead:
Right click on the .xcodeproj
file and select Show Package Contents. Then delete the project.xcworkspace
file. Open the project in Xcode and voilà.
Upvotes: 68
Reputation: 9186
In my case, the project was moved to my iCloud Drive without me noticing it.
If it happens to you too, just go to your Finder, locate the project and check if there is a cloud next to it. Just right click it and "Download now". Try again once the download is finished.
Upvotes: 1
Reputation: 2101
If you're working with git, right click the project-name.xcodeproj > Show Package Contents
, open the file project.pbxproj
and check for conflict and resolve it.
Upvotes: 0
Reputation: 6037
There are a couple of things you can try, first make sure Xcode is not running ,trash the ~/Library/Cache/ folder contents, and trash the contents of the ~/Library/Developer/Xcode/DerivedData/ folder, if you what to can just find the stuff for your project in ~/Library/Developer/Xcode/DerivedData/ and trash just that. Then restart your computer.
If that doesn't work, rename your faulty projects folder to so method like ' old', create a new project of the same name, and then move all of the source files from ' old' to you new project and add them. Its a bit painful I known but I have had to do this once to get a project working again.
Upvotes: 19