How to collaborate on a project with Xcode Storyboards?

后端 未结 1 539
花落未央
花落未央 2021-01-14 11:16

For a project I am developing for iOS, I want to collaborate with some freelancers. For collaborating on \'pure\' code I want to use GitHub. But a big portion of the work, w

相关标签:
1条回答
  • 2021-01-14 12:04

    As one of the comments pointed out, Storyboards are just XML files. That means git can easily upload them to Github. As to your initial question, you have to be careful not to modify the same views as your freelancer did, for if you do so, it will give you a merge conflict. What will happen then is that GitHub will modify the storyboards XML file inserting the <<<<<<< HEAD/>>>>>>> commit Id tags to show you where you have both changed something. This will then mess up the graphical storyboard and likely lead to Xcode no longer being able to open the Storyboard. This will throw the following error:

    "Main.storyboard"could not be opened. The operation couldn't be completed. (com.apple.InterfaceBuilder error -1.)

    To avoid that, simply edit other views, or always pull before starting to edit anything in the Storyboard. And even when using branches, when you'll try to merge you'll run into the same problem. However, it's noteworthy that you could just be working on different branches and the manually apply all the changes to one storyboard. This is tedious, but it works.

    Hope that helps, Julian

    0 讨论(0)
提交回复
热议问题