objective c - How to manage the code of multiple, very similar Xcode projects -


greetings stackoverflow community,

i have taken on task of 'unifying' 4 mobile iphone apps share 95% of code , differ in 5% (this of over-simplification, never mind). each of apps has own hefty set of resources (media files).

after 'unifying' 4 apps, adding new functionality apps, functionality apps share.

i appreciate hearing opinions on what's best way manage code of these apps. here approach i'm taking @ moment.

  1. i'm maintaining 1 xcode project includes functionality of 4 apps. functionality not shared among apps enclosed in condition such as: if (appname == 'x')...

  2. each app has own info.plist file, have 4 of such files: infox.plist, infoy.plist, ...

  3. before build app, 2 things done: a. in build settings, specify name of info.plist use. b. ensure app's resources (media files) in project. delete other apps' resources.

as apps 95% similar in code, having "one app rule them all" ensures when code gets upgraded, apps enjoy upgrade. can assume apps remain similar in code.

as apps' media files large , many, i'm keeping them off git repository.

how sound?

many thanks!

there better ways:

a. move framework

it depends on how generic common parts of apps. should think putting parts of in separate project framework. can link 4 apps against framework. but, of course, not go there.

b. have different targets

for sure should have 4 different targets. xcode let set build settings each setting commonly per project or specially per target. additionally can customize build phases (including copy of media files) on per target base. not have rename or delete , insert anything. select target, want build.

c. project tree

xcode allows have subprojects common code. maybe things common "foundation" classes of app. can have different projects each app in single workspace, using subproject.

probably best way combination, depending on subject. start b. , add other techniques, if needed.


Comments

Popular posts from this blog

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - UML - How would you draw a try catch in a sequence diagram? -

c++ - No viable overloaded operator for references a map -