Snapshots in Xcode
Many iOS developers are only aware if the existence of Xcode Snapshots when Xcode brings them up.
I’ve been taught to click ‘disable’ and move on. Others don’t and online resources like Stack Overflow are littered articles complaining about slow refactors and ARC conversions. What are snapshots, how are they used and should I use them?
Snapshots
Snapshots are a method of backing up the current version of projects and workspaces. It is an archive of the all the files in the project or workspace and the current workplace settings.
Using snapshots allows you to do three things you can’t normally do with undo and revert documents.
- It allows you to walk back operations include refactoring code, performing project validation, and adding Automatic Reference Counting to an existing project.
- It allows adjust to the workspace and project settings.
- It enables global search and replace operations. (Xcode Documentation)
Should I use them?
Probably not. When performing large transformations like adding ARC or refactoring code, it can be useful; however it can make things really slow.
Using git commit often should do it, especially before large operations.