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
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access