Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode project management: single engine - different personalized applications

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:

  1. Always different images set for visual elements (for controls, views, icons etc);
  2. Rarely different XIB files for small UI structure modification;
  3. Visual customizations - code level;
  4. Small functional modifications;
  5. Possibility to switch back to previous personalized versions;
  6. One functional engine (e.g. search functionality);

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.

like image 446
Martin Babacaev Avatar asked Feb 03 '11 10:02

Martin Babacaev


2 Answers

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.

like image 56
paulbailey Avatar answered Nov 17 '22 09:11

paulbailey


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.

like image 2
justin Avatar answered Nov 17 '22 09:11

justin