The Files in a Project
If you’ve been checking
your ~/Calculator
directory while stepping
through this chapter, you’ll probably have noticed
that several files were automatically created in it. This section
will discuss what these files contain and how they fit into a
project.
PB’s Groups & Files pane uses an outline view to list each project file by type, as shown in Figure 5-31. You can display the different types of files in this outline view by clicking the disclosure triangle next to a file type (e.g., Resources, Frameworks). In Table 5-1, we summarize what each file type means.
Figure 5-31. Groups & Files pane in Calculator’s main window in PB
Table 5-1. Cocoa file types
File type |
Typical extensions |
Meaning |
---|---|---|
Classes |
|
Objective-C class interface ( |
Other Sources |
|
ANSI C ( |
Resources |
|
Resources used by the application, including the IB
( |
Frameworks |
|
Library files that are linked into your program (e.g., Cocoa and Foundation). |
Products |
|
Applications that have been built with PB. |
The main.m Program File Generated by PB
When you create a project, PB generates an Objective-C file called
main.m
containing the program’s
Get Building Cocoa Applications: A Step by Step Guide 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.