Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Storyboards and SVN conflicts

This is a problem we never had to deal with until storyboards were introduced - Whenever there was a chance of conflict in UI, we just made sure that no 2 developers ever worked on the same XIB file simultaneously. The reason we refrained from resolving XIB conflicts is that there may be problematic side-effects (XIB is represented in XML format so there isn't a "good" way to merge 2 versions).

Now we are facing this issue because all of our UI elements are within the same .storyboard file - prevention of simultaneous work on any 2 UI elements in the project makes working in parallel very difficult.

Any suggestions as to how to tackle this issue? Thanks in advance for your efforts.

like image 243
Stavash Avatar asked Jul 18 '12 09:07

Stavash


People also ask

How do you resolve storyboard conflicts?

To resolve the conflict, examine it to be sure that the conflict is at the scene level as shown in Figure 4. Examine the conflict on each side. If the conflicted XML is wrapped with a scene tag (including the scene tag) and appears to be in the same spot in the XML, the conflict likely falls into this category.


1 Answers

Break up your storyboard into multiple storyboards.

There is no reason for your app to contain only one storyboard. Break your storyboard up into module storyboards. You can use +storyboardWithName:bundle: to load storyboard modules.

See: UIStoryboard Best Practices for other good storyboard ideas.


Update

It's important to note this is not a complete solution to the problem. In the same way you cannot completely avoid the possibility of merge conflicts in source code decomposing a giant class into smaller modules, you can't avoid the possibility storyboard merge conflicts either. The idea is to reduce the likelihood until it becomes a manageable problem.

There will alway be tricky merge situations in a large codebase. A properly decomposed solution will reduce the number of conflicts and minimize the number of lock out needed.

like image 109
Jeffery Thomas Avatar answered Sep 19 '22 09:09

Jeffery Thomas