Automatically update Xcode build phases for a goal?

It seems that in a standard Xcode project, the default target automatically “updates” the build phase of compilation sources with any recently added implementation files. This saves the user from having to drag each new file into phase.

I defined a second goal, which contains a large amount of unit testing code, which is related as a direct dependence of the actual (first) goal of the application. Consequently, goals can be maintained separately, although each time the first is built, like the second. This second goal also contains the Compilation Sources phase, but I have to copy the new source files to this phase every time I create them.

My question is: . How to set up the compilation source assembly phase to automatically include all source files in a project? (Or a subset of all source files?)

+3
source share
1 answer

When you add a new file to your project, Xcode asks what purpose you want to assign it to. If this step is performed correctly, there is no need to manually copy these files at the stage of compiling the target task.

+7
source

Source: https://habr.com/ru/post/1708764/


All Articles