Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 4.3 how to merge storyboard changes from two developers using SVN?

I'm running into an issue where a project has multiple developers working on the same storyboard file. As developers add controllers to their own version of the storyboard, the files need to be merged. As I look at a storyboard in plain text format during merge, I can't make sense of what changes I should accept and in which order.

Is there some sort of tutorial or a guideline on how to do merge changes from versions of the same storyboard? How do you manage changes to the same storyboard made by multiple developers?

Thank you!

like image 634
Alex Stone Avatar asked Jul 11 '12 14:07

Alex Stone


1 Answers

I guess my answer won't help you but... It seems like you can't be sure merge will be possible.

As storyboard (as xib file) are xml it's hard to have a 'sure' way to merge changes.

It seems that Google even forbid the use of xib for the same reason (behind-enemy-lines-google/ take a look at the end of the post).

I suggest you either try not to have parallel work on the storyboard, or ask developper to commit their change on the storyborad as fast as possible, in order to avoid conflicts (and to those who will still get conflicts, revert and redo their actions) but this can only work if you don't branch your project much.

Having multiple storyboard could help you avoiding conflicts (Storyboards and SVN conflicts)

You could also just use use xib files, since you have more xib file, you'll get even less chance of conflicts (also merging xib is simple in most cases - such as a newly added button or so).

At last, you could try to get a look at the storyboard xml to try to find a way to merge it (luckily, someone already did it and will find your answer), but keep in mind that these kind of files tends to change over time (we have applications which were started on XCode 3.xxx and just opening the xib on XCode 4.5.2 actually modify make the file, and some xib were created on XCode 4.1 so it's something frequent between XCode version)

[EDIT]

xcode-storyboard-merging

The answer there proposes an app, it's probably worth trying it !

like image 93
Xval Avatar answered Oct 21 '22 12:10

Xval