Xcode : Recover complete project from snapshot?

TalkingCode picture TalkingCode · May 30, 2009 · Viewed 9.5k times · Source

today I am playing a bit with the Xcode snapshot feature and I wonder if I could recreate a complete project from a snapshot if all code is lost.

It seems to me in the Snapshot-Manager I can only see snapshots of the current project, not of all projects. So if my projectfile is lost or damaged is there anyway to recover my files from a snapshot?

I also wonder were the snapshots are saved. Not in the project folder I found out already.

Answer

James Bedford picture James Bedford · Dec 4, 2012

Go to the "Projects" tab in the Xcode Organizer and select your project. You should see all the snapshots that have been made. Select the snapshot you want to restore to and select "Export Snapshot" to save it somewhere to disk. What you export to disk is your "recovered" version of your project.

I agree systems such as SVN and Git are far superior to Xcode's snapshot mechanism for version control. However, the snapshot mechanism can be very useful. For example, I just made a change to a project. Before making the change, Xcode asked me if I'd like to take a snapshot. After the change it turned out that I didn't want to make that change and so I used this mechanism to restore the project to the prior state.