views:

329

answers:

4
+1  Q: 

xcode snapshots

hi guys What exactly does xcode do with project snapshots after the xcode project is moved or renamed. I have noticed they completely disapear...Where should I look?

Defintely not in ~/Library/Application Support/Developer/Shared/SnapshotRepository.sparseimage

+1  A: 

If they are not in ~/Library/Application Support/Developer/Shared/SnapshotRepository.sparseimage then I think you may be out of luck. I tend to rely on snapshots only as a first line of defence, with Time Machine as a more reliable second line, and then SCM and proper backups as the third and fourth.

Paul R
+4  A: 

~/Library/Application Support/Developer/Shared/SnapshotRepository.sparseimage is a disk image. You have to mount it and look in there.

Snapshots are stored based on a hash of the project name; change the project name and you lose the snapshot history. If you take a snapshot of the new project, and can find the old snapshot on the disk image, you can probably move the old snapshot into the new one's directory.

cdespinosa
A: 

Another thing you should be aware of:

If you open and mount ~/Library/Application Support/Developer/Shared/SnapshotRepository.sparseimage as a disk image and then start Xcode to recover or look into your snapshots Xcode will complain that the Snapshot Repository is broken and move it into the Trash!

So remember to unmount the repository before starting Xcode.

To recover a trashed Snapshot Repository just drag it into the correct path (see above) and remove the date stamp inside the filename.

xoconoxtle
A: 

They are inside the image allright... but making so that xCode will recognize them won't be that easy...

In that image, you have the folder with all the snapshots (with some hierarchy)... and a plist file... in that plist file they have a HARDCODED (non relative to project file) paring system between each snapshot and the ORIGINAL PATH of the project folder.

So, if you really want to move/rename yar project, you'll need to change ALL the paths in that little plist file...

p.s. if you're gonna do the changes, you might wanna close xCode before you do... it might make him angry... :P

Suicidal