views:

46

answers:

1

This very helpful answer explains how to include different files in different targets in an Xcode project.

My question is more of a philosophical one -- what conventions can I used to keep things organized?

Situations I am likely to encounter include the following:

  • Different versions of a class for different targets
  • Desire for different header files for said different versions of a class
  • Whole portions of my project that apply to some targets but not others

I want to manage the whole thing with a minimum of fuss.

A: 

It sounds like multiple projects is the way to go, particularly where you have lots of files that are only relevant to one or two targets. It also means that you can have just one version of a class per project, only building targets that use this version. Xcode can still understand dependent targets when they're in different projects, just import the project with the dependency into the main project.

Graham Lee
All of my files are relevant to the main project. Sub-projects are basically a subset of the main one, with some classes changed as a result (e.g. only keep part of the model around).
William Jockusch