views:

437

answers:

4

Is there a way to get XCode to play nice with shared folders and allow multiple people to work on an iPhone app at the same time? Or are we going to need to switch to something more like SubEthaEdit or some other realtime-collaboration tool?

A: 

Xcode is know to play very badly with the file system. When managing a project, you have two option, to add the folders as group or as folder references.

If you add a group, then the folder will be mirrored into Xcode, but the group won't be in sync with the filesystem, that is you can move things within the group, delete the group, won't touch the FS, reverse will make Xcode lose the files.

The second option, to add a folder reference sounds very sweet, but is totally bugged. Folder references might not update properly, changes are not detected within the folders (if you add an Images folder reference to your resources and update the content, your resources won't be updated on next build, you have to clean&rebuild).

This is why you should either not use Xcode (we use vim + SCons here and are very happy with it) or you need to use an SCM (SCM can be coupled with other tools too, you SHOULD use an SCM anyway).

As for the SCM I recommend Mercurial, but there is also SVN and Git and a lot of others, I suggest you Google a bit and make your opinion.

A: 

If you use an SCM, the best approach so far is to check in the project.pbxproj file (inside your .xcodeproj bundle). Mostly that merges just fine, sometimes you have to manually merge but in those cases 90% of the time you simply allow both sides of the merge.

My .gitignore file looks like:

# xcode noise
build/*
*.pbxuser
*.mode1v3
*.perspectivev3
*~
*.mode2v3

You could use a similar ignore set of directives for other SCM systems.

Folder references are OK for images (with the caveat you have to do a Clean if you change any image contents) but are not great for source.

Kendall Helmstetter Gelner
A: 

Letting multiple people work on a shared folder is a recipe for disaster, and you will regret it the first time somebody overwrites the file you've been editing for most of the morning because they wanted to update a comment in it.

Get a SCM and get everybody to check out their code into their own private folder.

You'll also be happier when your builds go faster because you're building off of a local disk instead of a network disk.

Rudedog
icefire, This is the answer you should select. Code management systems like Subversion were created to handle precisely this kind of problem. Use the right tool for the job.
TechZen
A: 

If your looking a real-time collaboration i.e. two or more programmers actually writing the same code to the same file at the same time, you will need to use a collaborative editor like subethaedit. You can set subethaedit as the preferred editor for your source files in Xcode.

That way, you have one programmer who hosts the Xcode project, who opens up the source files in subethaedit. Other programmers then log into the file via subethaedit. Then the hosting programer compiles the code in his local Xcode.

However, as noted above in Rudedog's comment, if you just want to have multiple people working on same project but on different files, you should use a code management tool.

TechZen