Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to work on iOS storyboard with team using git?

I am working with git and iOS project for a long time everything is works well but only one thing that troubles me frequently. When I work with my team on a iOS project with single storyboard, each member has maximum chance that he will use storyboard, so the problem comes when we merge code it will show conflicts on storyboard and it's very hard to decide which code we want and which we have to discard(On XML view of storyboard), similarly it can be happen with project settings. The work around for this problem that I use is communicate with team and if any one of them want to use storyboard then he will notify other that do not use storyboard until I finish and commit,push the code and agin notify all the that storyboard is free. The other solution is to use multiple storyboard, But is there any other way to use single storyboard with team and avoid conflict or correct them easily ?

like image 490
Varun Naharia Avatar asked Oct 18 '22 05:10

Varun Naharia


2 Answers

From my personal experience, it really is difficult and there really is no way of making this easier. My team and I try to communicate as much as possible. It also is worth noting that reading the commit messages from the branch your merging with will give you a better sense of what files were touched. Some things are easy to identify in the XML file and some aren't. Launch the Merge Tool and try to work it out with your teammates if you really aren't sure.

like image 60
Stephen Paul Avatar answered Oct 20 '22 20:10

Stephen Paul


No.

Communication with the team is never a bad thing either way. But unfortunately there is no magical "fix-conflicts.sh" and no graphical conflict tool.

Storyboards are damn complex and a merge conflict in a storyboard rarely means two people added two separate views. You will ALWAYS get merge conflicts when people move stuff around or change the "point of view". Also, if there are misplaced views, which happens all the time when you use custom fonts and open up the storyboard for a 20s glance: Xcode will not load custom fonts fast enough, and calculates the view frames with wrong. If you save and close before Xcode corrected it: bam misplaced view and merge conflicts.

Do your team a favor and split the board thoughtful.

You see, the concept of storyboard ("designed" UI in general) itself is so complex, that merge conflicts will be a real pain in the ass.

like image 21
Julian F. Weinert Avatar answered Oct 20 '22 19:10

Julian F. Weinert