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 ?
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With