Search code examples
xcode4

Xcode setting has made my project disappear from view


I was about to add a new app icon in Xcode 4.3 when I accidentally clicked something in the project inspector (the joys of using the touchpad and not a mouse). I had my project selected and was about to add a new image for iPhone retina icon when I accidentally selected something and now I cannot see anything of my project. The last thing I remember seeing was a drop-down menu change to "Absolute" (I think as I only saw it for a moment) and I think the label was something to do with paths. The screen flashed and the entire project disappeared from the Xcode UI even though it is open.

The folder created in my Documents folder by Xcode is still in tact and all files are present. Even opening the project from here renders the same result - a completely empty Xcode except for appdelegte.h and .m.

I have even tried restoring an earlier snapshot but it does not help. When I open my project all I see is the AppDelegate.m and .h and nothing else. The only item in my project navigator where I used to see all my files is my app name .xcodeproj in red text. I cannot find anything to help me get my project back.

Can anyone help me to reverse this simple mistake?


Solution

  • I was able to reproduce this problem consistently and cause Xcode to crash in the process.

    1] Start Xcode (Quit and re-start) and create a new utility project named TestProj. I don't believe the project type or name makes a difference but I didn't try any other combinations. Do not create a GIT.

    2] After the project is created, simply click on "Location" which is greyed out because the project is selected in the project navigator. Once you have done this, the project is hosed and you can't get the project to open in project navigator again - it simply shows "TestProj.xcodeproj" where the project used to be listed in the project navigator.

    3] To see Xcode crash, selected "Relative to SDK" and Xcode dies. I have accidentally clicked on that greyed out location twice simply due to my apparently terrible mouse skills.

    Apple, please fix this!