How to use Subversion for an Xcode project with NIB files

.svn folders in the NIB file disappear!

You modify a NIB file with Interface Builder and save it. Interface Builder actually deletes the previous NIB and recreates a brand new one. So any .svn folders inside are lost. To resolve this problem, open a Terminal and enter:

defaults write VersionControlDirectory "(CVS, .svn)"

That will make Interface Builder copy the .svn folders to the new NIB file.

NIB file is read-only!

Some files in .svn folders are read-only. Because of that, Interface Builder believes the whole NIB is read-only. To fix that, add writing right to the NIB's files. At your Xcode project's root:

chmod -Rv u+w *.lproj/*.nib/.svn

Sadly, you will have to do that at every update/commit. You can add this alias to your .bashrc:

alias nib="chmod -Rv u+w *.lproj/*.nib/.svn"

Largely inspired from: Subversion and Interface Builder


You left out the \ so your defaults command doesn't work. The rest was quite helpful. Thanks defaults write \ VersionControlDirectory "(CVS, .svn)"
Sam Soffes
Feb 26, 2008
Thank you Sam, that's fixed now :-)
Feb 27, 2008