views:

147

answers:

1

It seems that in a standard Xcode project, the default target automatically "updates" the Compile Sources build phase with any newly-added implementation files. This saves the user from having to drag each new file into the phase.

I have defined a second target, which contains a large amount of unit testing code, which is linked as a direct dependency of the actual (first) application target. Therefore, the targets can be maintained separately, though any time the first is built, as is the second. This second target also contains a Compile Sources phase, but I have to copy new source files to this phase each time I create them.

My Question: How do you configure a Compile Sources build phase to automatically include all source files in a project? (Or a subset of all source files?)

+6  A: 

When you are adding a new file to your project, Xcode asks you to which target you want to assign it. If this step is done correctly, there is no need to manually copy those files to Compile phase of Test target.

mouviciel