Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

svn conflict xcode project file while working in team

I'm working in a team that's developing iPhone application (about 7 people). We use SVN for source code control of iPhone code, we keep running into conflict issues with xcode project file and iPhone nib file. I think there has been a question asked about this problem : How to merge conflicts (file project.pbxproj) in Xcode use svn?. I want to ask if anyone has ever come up with a satisfactory solution to this. Since our team is fairly decent in size (7 people), manually resolving conflict in xcode project file everytime someone changes code, or adding new object into nib file is a huge productivity waste. Has Apple engineers ever thought about this issues when they wrote their own iPhone apps ? I have been looking for a satisfactory solution using Google and Bing, not yet found one.

Thanks,

like image 765
phamductri Avatar asked Jan 20 '11 00:01

phamductri


1 Answers

This is definitely a HUGE flaw with xcode. I'm on a team of similar size and here's what I do to make the process as painless as possible:

SVN update (ALWAYS do this before a checkin as well):

  1. quit Xcode. The quickest way to do this is to use Alfred and type "forcequit xcode"
  2. "svn up" in the project folder from command line
  3. If you have any merge conflicts with the project file, hit "edit" to open in emacs or whatever
  4. search for "======" to find merge conflicts; delete that line as well as the "<<<< mine" and ">>>>" lines
  5. save & exit. hit "r" to mark project as resolved.
  6. re-open project - "open MyProject.xcodeproj/"

With a bit of practice you can get this process down to under a minute (I do this several times a day).

for NIB files, DO NOT work on while someone else is working on it. There's no real way to merge them. Make your changes quickly and check in right away (there aren't many cases where 2 people need to work on a NIB file at the same time anyway). For less complicated views, just lay them out programmatically.

like image 106
Cam Saul Avatar answered Oct 20 '22 17:10

Cam Saul