Thursday, 18 September 2014

Best way to Avoid merge conflicts with Storyboards

As of using storyboard in iOS app development, it is observed that working as a team on an Application, we face issue of  merge conflicts in storyboard changes. for example, if  same time two developers make changes in UI, it creates issue in merging code because of having single storyboard for all team members.

All though there are lots of compare-merge tools to solve merging issues. These tools are very useful for  merging other files like .h and .m files but these tools are not so useful to compare and merge storyboard changes.

So Creating multiple storyboards in the application is the best way to Avoid merge conflicts in case of working as a team. For big projects, recommends to use multiple storyboards in practice for more modular code.

 Xcode gives option to add multiple storyboards in application. It would be good if we create one storyboard for one module or related screens 
Like Login, Registration and Forgot Password related scenes/Screens can be create in one storyboard and User Profile, Settings can be in separate storyboard.

By doing this, we can work as team even without storyboard conflicts. And without wait for other member to finish his UI changes first and get updated code.

* Small project can have a single storyboard.
* For big projects it is recommended to create multiple storyboards in practice to more modular code.
* Multiple storyboards practice avoid merge conflicts when working as a team.

No comments:

Post a comment