One important transition in moving to Mac OS X development is the switch from including individual headers to including framework-style headers in your source code files. A framework is a type of bundle that packages shared resources, such as a dynamic shared library and its associated resource files, header files, and reference documentation. An umbrella framework is a framework that includes a number of related frameworks. The Carbon framework (Carbon.framework) is an umbrella framework that contains just one header, Carbon.h. That header in turn includes headers from many additional frameworks, such as Core Services, HIToolbox, and others.
A framework-style include statement specifies a framework (typically an umbrella framework) and its main header file. For example, a Carbon source file should use the statement #include <Carbon/Carbon.h>, rather than separate include statements for each individual header file it may require. Using framework-style includes will help ensure that your project builds correctly and remains reliable over time.
Note: You can add system frameworks by dragging them into the Groups & Files list of your Xcode project (from /System/Library/Frameworks), or with the Project > Add to Project menu item.
For related information, see “Header Files,” “Precompiled Headers and Prefix Files,” “Cross-Development,” “Use Framework Headers,” and “Use C99 Standard in Language Settings.” For more information on frameworks in Mac OS X, see Framework Programming Guide.
Last updated: 2006-10-26