Among the features peculiar to Macs since Mac OS X are bundles and packages, structured directories presented to the user as single file-like objects, although they may in fact contain thousands of individual files. Loose usage of the two terms doesn’t draw a clear distinction between them, but here I’ll use their stricter forms:
- A bundle contains a single directory named Contents, within which are some standard files including an Info.plist property list, and more. Most frequently encountered are app bundles, but bundles are used more extensively to contain executable code.
- A package is a directory containing files and directories conforming to a recognised structure different from a bundle, such as an RTFD document, a logarchive, and others. In some cases, these are generally known as bundles, for example sparse bundle disk images.
Among the many confounding features of these are frameworks, which are often referred to as bundles, but for historical reasons aren’t even shown by the Finder as packages, but simply as structured folders.
Bundles and packages didn’t exist in Classic Mac OS, which used resources stored in an app’s resource fork instead. They’re descended from the structured directories used for apps in NeXTSTEP, and have since expanded for many other purposes.
One of the better ways to distinguish between these is to examine their UTI. True bundles conform to com.apple.bundle, while packages more generally conform to com.apple.package instead. According to that, frameworks are bundles, despite having a different structure, and packages with the extension .bundle have the UTI com.apple.generic-bundle and conform to both, even though most aren’t bundles at all!
One universal feature of both bundles and packages is their capacity to cause problems on other platforms, such as Windows. This explains why they’re largely confined to Macs, as few Windows apps can cope with what they see as a directory instead of an RTFD document.
App bundle
The fundamental requirements for an app or related bundle are:
- The whole bundle’s contents are within a single top-level folder named Contents.
- Within Contents is an Info.plist property list containing information and settings for the bundle.
- There’s executable code, normally in the form of a Mach-O binary inside a folder named MacOS, although some bundles may be codeless.
- For historical and compatibility reasons, there’s a PkgInfo file containing a Classic Mac OS type and creator code for the bundle, such as
APPLand????for an app.
Their layout is shown below, with the essentials in light red.
Apple provides detailed instructions here for developers. The Foundation class Bundle provides a rich API for creating and accessing bundles.
Frameworks
In comparison with app bundles, frameworks are deeper, lack a top-level Contents folder, contain at least one version of the framework (although two or more are now exceptional), and come with symbolic links. This is shown below, again with the essentials in light red.
Three symlinks merit explanation:
- Versions/Current links to A, the current (and only) version of the framework.
- a symlink with the same name as the framework’s code is at the top level of the bundle, alongside the Versions folder. That links through the Current symlink, giving the path Current/A/[code].
- a symlink named Resources is also at the top level of the bundle, alongside the Versions folder. That too links through the Current symlink, giving the path Current/A/Resources.
Thus paths to the Info.plist file include Resources ➜ Info.plist via the top-level Resources symlink, Versions/Current ➜ Resources via the Current symlink, and Versions/A/Resources without using any symlinks. This demonstrates how confusing this layout can appear in the Finder.
Frameworks commonly include other nested frameworks, appexes in their PlugIns folder, and a diverse range of other resources including localisations in the Resources folder.
Packages
The structure of packages varies widely, and depends on individual requirements for that type. As any app can define and use its own package format, there's no generic reference to those different structures.
Sparse bundle disk images consist of a single package folder containing:
- bands, a folder containing the contents of the disk image in band files
- info.plist and its backup copy info.bckup, containing settings including band size
- lock, an empty file
- mapped, a folder containing small data files to match all of the band files except the first
- token, an empty file.
RTFD documents consist of a single package folder containing:
- TXT.rtf, a file containing the rich text contents in RTF format
- multiple image files, to be embedded in the document.
- Contents, a folder containing a PkgInfo file with a Classic Mac OS type and creator code for the package, e.g.
RTFDandNISXfor a document created by Nisus Writer Pro. This is now optional.
Icon Composer icons consist of a single package folder containing:
- Assets, a folder containing the icon image in PNG format
- icon.json, a file containing settings for the icon in JSON format.
Installer package archives with the extension .pkg aren't packages in this sense either, but an unfortunate collision of terms.
Finder Alias forbidden
If bundles and packages aren't strange enough, they also have a Finder behaviour that appears unique, in blocking the creation of Finder Aliases in the top level directory. This applies to all bundles and packages, including custom packages, that are displayed as single items rather than as folders, but doesn't apply to frameworks.
Use the Finder's Show Package Contents command to open and display a bundle or package, select the Contents folder or another item immediately inside the bundle/package wrapper, and the Finder's contextual menu omits the command to Make Alias. That's still offered for items inside folders within that wrapper, though. Other methods of creating the alias, such as my command tool alisma, can still create aliases there, but the Finder has stubbornly refused for many years.
Apple neither documents nor explains this oddity.
Reference
Apple's reference account from 2017.


