Information Technology Reference
In-Depth Information
CROSS-REFERENCE
There's a more advanced guide to build settings in Chapter 13.
Working with Schemes and Build Configurations
Developers often need to customize builds for different purposes; for example, a test build for debugging is
likely to have different build settings than a final App Store build. Xcode handles this in two ways.
Build configurations allow you to change a subset of build settings for a specific aim: debugging, release, and so
on. Potentially, every build setting can hold a different value for each configuration. By default, most settings
take a single value; only a small number are initialized with multiple values.
Schemes give you wider control. The key feature of schemes is that they define build actions that allow you to
build your project for different purposes: testing and debugging, code analysis, archiving, and so on. Schemes
include build configurations, but add other build and test options.
Getting started with build configurations
Switching configurations is a quick way to change a group of build settings in a single operation, as shown in
Figure 12.9. When you select a configuration, Xcode automatically selects the corresponding values and applies
them to the build. Single-valued settings remain constant.
In practice, this means that you can quickly customize a configuration to create a build for a specific
aim—debugging, local testing, App Store release, Ad Hoc release, and so on—without having to create a separ-
ate independent list of build settings.
Conveniently, configurations include the settings needed to create useful debug and distribution builds. Less
conveniently, these settings are scattered randomly throughout the full list of all build settings.
NOTE
Why not duplicate every build setting for a configuration? The practical reason is that the settings editor can dis-
play multiple values for different configurations. But duplicating every setting for all possible configurations would
make the editor unwieldy and difficult to work with. In practice, most settings don't need to be modified, so most
of the duplication would be unnecessary.
FIGURE 12.9
Most build settings have a single value. Settings included in a configuration file can take and display multiple val-
ues. The resolved value depends on which configuration is active.
 
Search WWH ::




Custom Search