I am using a workspace for a new Xcode 4 project. Should the *.xcworkspace
file be included in the main repository (along with the source files of the project for example)?
Thanks Ross
btw. I am using GIT
File created by Xcode, a development application for creating iOS and Mac OS X (Cocoa) applications; saves workspace settings including and the View (Navigator, Debug, and Utilities panes) and Editor states; created by selecting File → Save As Workspace... with an open project.
It allows you to add features to your app without disturbing the original source code. It also allows you to revert files back to a previous state, revert the entire project back to a previous state, compare changes over time and much else.
1) Projects contain files (code/resouces), settings, and targets that build products from those files and settings. Workspaces contain projects which can reference each other. 2) Both are responsible for structuring your overall project, but on different levels.
In short yes it should be commited. I have my xcworkspace file checked in to my repo. If you don't use a workspace it probably isn't needed but as I use Cocoapods this creates a xcworkspace with the original project and the pods project inside of it.
Probably yes. The workspace is basically a set of projects, so if other developers would want to work with the same set, then you should put the workspace into version control.
If the workspace is strictly for your own use, or if there is only one project in the workspace, then maybe you don't need to put it into version control. But that means you'd need to recreate it whenever you move to a new machine or decide to blow everything away and start from scratch.
Xcode 4 is pretty good about putting user-specific data into folders/files whose names contain the word "user" or your user name, and putting build products and temporary files somewhere outside of the source tree, so in general, I'd put everything that isn't obviously user-specific into the repository.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With