9

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!

Alex Stone
  • 46,408
  • 55
  • 231
  • 407
  • Could you post an example of something that isn't obvious how to resolve? I'd like to help with specific cases. – Jon Hess Jul 12 '12 at 03:03
  • That's a taught one, but I recommend you use many storyboard instead of trying to merge one. So one developer can focus on a particular storyboard – MUH Mobile Inc. Dec 05 '12 at 16:32

1 Answers1

5

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 !

Community
  • 1
  • 1
Xval
  • 938
  • 5
  • 17
  • I read that article about the Google Maps app and found it interesting but sensible that they don't touch xibs or storyboards.. It is very difficult for multiple developers to work on a project and not each have to touch the storyboard. – RyanG Jan 09 '13 at 15:09
  • I agree that's it's a very straightforward way to go, but in their case, they do have branches for each feature implementation so conflicts probably happen more often. I guess using xib file or storyboard also depend of your way of working. – Xval Jan 09 '13 at 15:12