Header Files

A framework’s files are its public interface. All code that wants to use the framework must include one or more of its headers. Project Builder offers a few options for dealing with header files that are of interest to framework builders. The first, precompiling, makes for faster compiles. The second, private headers, makes it possible to separate internal and external interfaces.

Precompiled Headers

To make compiles run faster when using a framework, it is possible to precompile the framework’s headers. Precompiling avoids the time that would be spent by the compiler to parse the headers. To do this in a framework project, create a master header file that imports all the public headers files in the project. (Look at a header ...

Get Cocoa® Programming 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.