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.

Device Architecture and Conditional Code

As you create a project (File → New → Project), after you pick a project template, in the screen where you name your project, the Devices pop-up menu offers a choice of iPad, iPhone, or Universal. You can change this setting later, using the Devices pop-up menu in the General pane when you edit the app target. What you are ultimately determining here is your project’s Targeted Device Family build setting:

1 (iPhone)

The app will run on an iPhone or iPod touch. It can also run on an iPad, but not as a native iPad app; it runs in a reduced enlargeable window, which I call the iPhone Emulator (Apple sometimes refers to this as “compatibility mode”).

2 (iPad)

The app will run only on an iPad.

1,2 (Universal)

The app will run natively on both kinds of device.

Two additional project-level build settings determine what systems your device will run on:

Base SDK

The latest system your app can run on. As of this writing, in Xcode 8.0, you have just two choices, iOS 10.0 and ...

Get iOS 10 Programming Fundamentals with Swift now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.