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 tab when you edit the app target; but your life will be simpler if you decide correctly here, at the outset, because your decision can affect the details of the template on which your new project will be based. Your choice in the Devices pop-up menu also affects 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 ...
Get iOS 9 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.