Actually that title is a bit of an oxymoron, whilst Xcode can be used in the enterprise with SCM systems like Subversion (SVN), there are some things that Xcode refuses to do properly one of them being honouring SVN file locks.
SVN file locks allows you to mark files that should not be edited concurrently via the svn:needs-lock attribute. Examples of files that you should really apply this to are:
- *.XIB files
- *.StoryBoard files
Now Xcode will see the SVN attribute and prompt you if you wish to “unlock” it. It appears however that whatever Xcode is doing, it certainly is not informing the SVN server about SVN locks as other members in my team can perform the same action, even on Windows leading to false assumptions over file integrity. Regardless of the OS, this passive lock breaks all user workflows if they attempt to check in the file due to a SVN error.
Solution
So what can be done about it? We have a few options:
- Use SVN command-line tools in Terminal
- JetBrains AppCode – full alternative to Xcode (minus IB) + SVN client
- Zennaware Cornerstone
- Black Pixel Versions
- Any of the above tools fully honour SVN needs:lock for concurrent users on multiple machines and platforms.
And what if I don’t want to pay for an IDE? there is no solution yet in XCode?
LikeLike
Apple has yet to come up with an adequate solution sadly. SVN Command-line tools are free.
LikeLike
Do you mean in your post that needs-lock (even if I set with a SVN client) wouldn’t work in Xcode unless I lock the file from command tool?
LikeLike
Yes, you are better to use manual locking via SVN command-line tools or the other SVN clients I mentioned.
Lock the file outside of Xcode first.
LikeLike
Thanks I am trying Versions.app for now to see if it works. Can I cancel locking file from Xcode? so the developers wouldn’t do it “by mistake”?
LikeLike
Not that I could find no sadly. Maybe try one of the chaps over at stackoverflow.com ?
LikeLike