Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should the Xcode 4 workspace file be version controlled?

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

like image 676
Ross Avatar asked Apr 11 '11 17:04

Ross


People also ask

What is an Xcode workspace file?

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.

Does Xcode have version control?

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.

What is the difference between Xcode project and workspace?

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.

Should I check in Xcworkspace?

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.


1 Answers

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.

like image 147
Kristopher Johnson Avatar answered Sep 27 '22 17:09

Kristopher Johnson