O'Reilly logo

iOS 12 Programming Fundamentals with Swift by Matt Neuburg

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 9. Life Cycle of a Project

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.

Environmental Dependencies

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:

Runtime dependencies

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?

Compile-time dependencies

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required