Information Technology Reference
In-Depth Information
CAUTION
Be aware that some of the build settings and options interact with each other, while others may not do what you
expect them to. These gotchas are listed in this section, with suggested workarounds.
Creating a build for testing and debugging
The debug/test build is the default in Xcode. So for iOS Simulator testing and OS X testing, you don't need to
do any customization. Optionally, you can select the runtime platform using the pop-up menu at the top left of
the main Xcode toolbar and customize other build settings as needed. But the defaults should create a build that
can be debugged and launch it.
Selecting the Base SDK
The Base SDK is the version of the libraries and headers used to generate apps for a specific version of either
iOS or OS X. Whenever a new version of either OS is released, Apple generates a new version of Xcode for de-
velopers with an updated SDK.
Early versions of Xcode 3 didn't handle this intelligently. When you loaded an old project or downloaded a pro-
ject from a website, Xcode typically displayed an unhelpful “SDK missing” error message. Because Xcode
couldn't find the original SDK, the project wouldn't build until you selected an updated SDK manually.
In Xcode 4, the project build settings include new automated Latest iOS and Latest Mac OS X options, as shown
in Figure 13.1. If you save your projects with this setting and reload them into a later release of Xcode, they
should select the most recent SDK automatically, even if it's different from the SDK used for the original project.
Note that projects saved with older versions of Xcode continue to show this error when you reload them. (This
is a common error when you try to load a sample project downloaded from a developer's blog.)
To fix the problem, select the latest SDK manually in the build settings after loading the project.
NOTE
You may want to change this setting for final distribution builds, as described later.
FIGURE 13.1
Selecting the Latest OS option to ensure that projects always load with a current SDK
Search WWH ::




Custom Search