O'Reilly logo

Learning Cocoa with Objective-C, 2nd Edition by James Duncan Davidson, Apple Computer Inc

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 13. Bundles and Resources

Even though it may look like a single file in the Finder, a Cocoa application is actually a collection of files in a special directory structure known as a bundle. Bundle directories in the filesystem have a special significance that the Finder understands and that allows users to treat applications, as well as other types of bundles, as a single entity. This allows users to install an application simply by dragging it from a CD image and relocate it by dragging it around the filesystem.

There are three general types of bundles:

Application bundles

Application bundles contain an executable and all its related resources, such as nib files, image files, and localized strings. For example, most of the applications installed in the /Applications folder are application bundles.

Plug-in bundles

Plug-in bundles provide code that extends or enhances the functionality of a host application in some way. They plug into some kind of architecture provided by the host application. An example of a plug-in bundle is the screensaver modules installed in the /System/Library/Screen Savers folder. Each of these bundles is used by the screensaver system (whose control panel is in the System Preferences).

Framework bundles

Framework bundles contain dynamic shared libraries, as well as header files, images, and documentation. For example, the two Cocoa frameworks, Foundation and AppKit, are packaged as framework bundles in the /System/Library /Frameworks folder. Framework ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required