This chapter surveys some of the main stages in the life cycle of an Xcode project, from inception to submission at the App Store. This survey will provide an opportunity to discuss some additional features of the Xcode development environment: configuring your build settings and your Info.plist; editing, debugging, and testing your code; running your app on a device; profiling; localization; and final preparations for the App Store.
Your app may need to make certain choices based on the environment in which it finds itself. These may be broadly divided into runtime and compile-time dependencies. Here’s a list; I’ll give details in the rest of this section:
These are choices made depending on what the app discovers its environment to be when it runs. Typical dependencies are the type of device we turn out to be running on (iPad vs. iPhone) and the system version installed on this device:
Should the app be permitted to run under this environment?
Should the app do different things, or load different resources, depending on the environment?
Should the app respond to the presence of an argument or environment variable injected by Xcode?
These are choices made at compilation time; the compiler can substitute different code, depending on the target environment while building. Typical dependencies are:
The version of Swift under which we’re compiling.
The type ...