From Project to App

An app file is really a special kind of folder called a package (and a special kind of package called a bundle). The Finder normally disguises a package as a file and does not dive into it to reveal its contents to the user, but you can bypass this protection and investigate an app bundle with the Show Package Contents command. By doing so, you can study the internal structure of your built app bundle.

We’ll use the Empty Window app that we built earlier as a sample minimal app to investigate. You’ll have to locate it in the Finder; by default, it should be somewhere in your user Library/Developer/Xcode/DerivedData folder, as shown in Figure 6-14. (If you’re using Mountain Lion, I presume you know how to reveal the user Library directory. In theory, you should be able to select the app under Products in Xcode’s Navigation pane and choose File → Show in Finder, but there seems to be a long-standing bug preventing this.)

The built app, in the Finder
Figure 6-14. The built app, in the Finder

In the Finder, Control-click the Empty Window app, and choose Show Package Contents from the contextual menu.

Contents of the app package
Figure 6-15. Contents of the app package

Looking inside our minimal app bundle (Figure 6-15), we see that it contains these files:

Default.png and friends
The three launch image files have been copied to ...

Get Programming iOS 6, 3rd Edition 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.