Information Technology Reference
In-Depth Information
By default, each project has a single scheme. But whenever you create a new target, Xcode 4 autocreates a new
scheme for it.
There's almost limitless potential for confusion in this arrangement, because the UI doesn't make the distinction
between schemes and targets clear. In fact, the new scheme and the new target have the same name.
To clarify the relationship, remember the following:
The scheme menu selects schemes, not targets.
In Xcode 4, you never build a target directly. Instead, you run a standard build action.
The action defines which targets are built.
A scheme can define separate multiple targets for each action.
Before a scheme can build multiple targets, you have to add each target to the scheme by hand.
Figure 12.17 clarifies the anatomy of a scheme. The Build action is central because it's run by every other ac-
tion, and it selects which targets are built by each action.
When you create a new target and Xcode autocreates a scheme for it, it enables all the build actions for it. This
may or may not match your needs, depending on how your project is organized. For example, if you're creating
a framework and building a test project around it, you're more likely to build both at the same time.
FIGURE 12.17
The anatomy of a scheme. The Build action is effectively a subroutine for the other actions. It also can be run in-
dependently.
Search WWH ::




Custom Search