Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS - best practice for managing code merge in a storyboard

Merging in a xcode storyboard with many team members can produce many conflicts etc. I need a strategy to share a storyboard with 20 team members but to avoid the nightmares associated with merging code in a storyboard.

I thought of having a separate target per team in xcode but this doesn't do well as we all need the updates so having two story boards is not good practice.

my code base is inherited. its a forked project that is storyboard heavy already. I think changing to xib might be difficult (??)

like image 859
j2emanue Avatar asked Mar 25 '15 18:03

j2emanue


People also ask

How do you resolve a merge conflict in a storyboard?

Developers should evaluate if they actually made a change to a storyboard, and only include it in the commit if they did. If a merge conflict of this type is encountered, the simplest approach is to review the conflicts, and if they are minor layout adjustments, select the newest change to resolve the conflict.

How do I merge two storyboards in Xcode?

Per Pierre Perrin: "The easiest way is to select your viewControllers, copy and paste in you main. storyboard." Regarding the swift files associated with the view controllers and whether or not you will need to update the class references in the identity inspector, "normally it will be done automatically.

How does storyboard connect to code?

Select the shake button. Hold the control and click-drag from the storyboard button into your view controller source file as if you were to create a IBOutlet. When prompted to name your IBOutlet, change the connection type from Outlet to Action using the dropdown menu.


2 Answers

Check out this tutorial which clearly suggests not using a storyboard while working on team.

But you can divide team into each module and use some versioning system as bitbucket or git to manage your code with the help of multiple storyboards(separate storyboard for separate module).

Careful day by day commit and pull will definitely resolve conflicts.

like image 80
Anish Parajuli 웃 Avatar answered Oct 17 '22 08:10

Anish Parajuli 웃


Our team has found the majority of Michael Behan's method to work well. ⌘Boom

  • Everyone on the same build of Xcode
  • Multiple storyboards
  • Use Nibs for custom views
  • Think about which storyboards are involved when assigning tasks
  • Merge storyboards often
like image 43
Justin Vallely Avatar answered Oct 17 '22 09:10

Justin Vallely