O'Reilly logo

Modding Mac OS X by Erica Sadun

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

Understanding Bundle Structure

The Contents folder and its subfolders may hold any number of items, including executables, property lists, character string files, multimedia, plug-ins, and more. Each of these items is stored in a logical hierarchy. You can expect to find executables inside the MacOS folder, pictures inside the Resources folder, and so forth.

Understanding the standard items that appear can help you better approach the nonstandard items that are unique to each application. Inside the Contents folder, you may encounter the following items:

  • Info.plist

  • PkgInfo

  • MacOS folder

  • MacOSClassic folder

  • Resources folder

  • Frameworks (or SharedFrameworks) folder

  • Plugins folder

  • SharedSupport folder

Each of these items will be discussed in the sections that follow.

Info.plist

Info.plist is an XML file that appears inside every application bundle. It stores an information property list that contains important details about an application. From this file, the Finder can learn about supported document types and extensions, icon associations, the location of the application’s help file, version info, copyrights, and so forth. Although the items in each Info.plist file vary, some keys appear in most applications. Some highlights include the following (the parenthetic examples for each key are taken from Safari Version 1.1.1):

CFBundleExecutable

The filename for the executable file, usually found in the MacOS folder. (e.g., Safari).

CFBundleIconFile

The application icon filename, stored ...

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