The idea is that I have an application template that should be customized for different clients. The main goal is to provide a number of personalized applications with almost the same functionality.
What is the best approach of Xcode project organization (and maybe management) in order to achieve the following points for each client's application:
At the moment, for every personalization request I create in the same project's root directory new project file, and corresponding XIB files, images set and source files (for some functional requests) directories. Each project file has a reference to the main source files directory (engine).
But I suppose that's not the best way to organize this type of projects.
I'd probably choose to do this sort of thing using version control, and keep separate branches for each customised version. That way, the master/trunk can be your uncustomised code.
When you need to create a customised version, simply create another branch. If your core app needs to change, merging the changes from trunk into the branches should be straightforward, and this gives you the advantage of keeping all the customised code/files separate.
I don't know how easily this would fit into your workflow, but I think it ticks all the boxes, including being able to switch back to previous versions.
create a project template -- or just a zip file with the template.
first, determine where you can use (something such as) xml defs instead of overriding and other source level changes.
Always different images set for visual elements (for controls, views, icons etc);
add placeholder resources to the project template
Rarely different XIB files for small UI structure modification
add it to the project, referring changes (if it's changed) via vc
Visual customizations - code level;
core libraries, shared across all projects. consider using c or c++ if the library will be large. objc cannot be stripped. this contains implementation stubs, as well as common code, base classes, and interfaces.
Small functional modifications
extend the interface of your core classes so the subclasses may easily implement the frequent alterations. these files are part of the template.
Possibility to switch back to previous personalized versions;
it should be in vc, and the dependency versions should also be tracked.
One functional engine (e.g. search functionality);
an undefined factory function is simple enough:
id<MONSearchEngineProtocol> MONAppCoreCreateSearchEngine();
declare it in the static lib, but define (and implement what is necessary) in one of the project specific sources. you can add this other places - some people would stuff it in the app controller and override it.
if you have a lot of these to manage, consider moving your resources to code (rather than managing a ton of nibs). a nib defines a lot of code -- which is a lot of nearly duplicate code to manage. this will make sense for some resources, and not much sense for others.
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