Reputation: 519
I'm starting a new small study project and I will work together with a friend. We will work on the same project, but on different parts. Sometimes we will need to modify files that are common.
My question is: how do you guys manage this kind of project? My biggest concern is about storyboard file and some other shared resources.
Any advice would be great!
Upvotes: 2
Views: 408
Reputation: 12819
@Dima mentioned that NIB files are hard to merge, this also applies to project files. Some ways to deal with this:
Using static libraries is one of those things that is much much harder than it should be, but once you figure out the right combination of obscure changes to XCode's build settings everything works well.
In a nutshell, you need to
YES
, and make all header files publicSee the following links for the step by step:
The best HOWTO for iOS static libraries: http://www.blog.montgomerie.net/easy-xcode-static-library-subprojects-and-submodules
Then, the first error you'll encounter is probably "header files not found". Solution here.
If you have a project that needs to use resources like images or NIB files you need to add a .bundle
target. Instructions here.
You could also use a dependency management system like CocoaPods to automate some of this static library configuration and build. See here.
Finally, this answer also has an interesting approach to avoiding xcproject
conflicts: instruct git to "always union" the merge. Haven't tried this myself.
Upvotes: 1
Reputation: 23624
There are a bunch of things you can do here and not all of them are absolute, so here are a few of my opinions.
Use Git. Most simply would be to use a service like github or bitbucket.
Each person should create new branches for grouping all the commits for a particular change/feature and then merge the feature branches into your release branch.
Have a good gitignore, here is github's objective-c gitignore as an example.
If your team will be growing or there is a good chance you will be working on the same pieces at the same time, don't use storyboards or xibs in general. These are a really bummer when you have merge conflicts and generally don't behave well with multiple people working on them. I recommend laying out all of your UIs in code either with autolayout or without. This in my experience also makes UIs way easier to debug, refactor, and update.
Upvotes: 2