Wednesday, December 2, 2009

Xcode local SVN - setting up - 5 simple steps

The Snapshot feature in Xcode is really nice, but it isn't meant to replace a SCM. I've heard horror stories of entire projects being deleted using the snapshot feature. While it might be nice for trying something experimental out, I'd recommend setting up a real SCM also. This is how you set up a local SVN (single user, w/o server):

Using terminal, write the following:

1. svnadmin create /Full/path/to/the/Repository/you/want/to/create

I used /Users/andreas/Repository

2. Remove the build folder of your project. Otherwise you will get errors (Error: 155007, Error: 155005) *

In Xcode:

3. From the SCM menu, add a new SVN. Use "file" as scheme, and use the repository path + /projectname/trunk as path.

4. Import your current project into the SVN by clicking import in the CVS repository menu and browsing to your project.

5. Now CHECKOUT the project you imported. Once you've done this, open your checked out project. Go to project settings, and set your CVS to the one you created before.


* If you get these when trying to commit, remove the build folder from the svn (using the Xcode SCM browser), remove build from your project folder, update your project, rebuild, and then try and commit again.