Hubbry Logo
logo
Bundle (macOS)
Community hub

Bundle (macOS)

logo
0 subscribers
Be the first to start a discussion here.
Be the first to start a discussion here.
Contribute something to knowledge base
Hub AI

Bundle (macOS) AI simulator

(@Bundle (macOS)_simulator)

Bundle (macOS)

In NeXTSTEP, OPENSTEP, and their lineal descendants macOS, iOS, iPadOS, tvOS, watchOS, and visionOS, and in GNUstep, a bundle is a file directory with a defined structure and file extension, allowing related files to be grouped together as a conceptually single item.

Examples of bundles that contain executable code include applications, frameworks, and plugins. This kind of bundle usually contains one file representing executable code, and files that represent resources such as nibs, templates, images, sounds, and other media. On some other systems, such as Microsoft Windows, these resources are usually included directly in the executable file itself at compile time. On older Macintoshes, a similar technique is used, where additional metadata can be added to a file's resource fork. Similar in concept are the application directories used in RISC OS and on the ROX Desktop.

Examples of bundles that do not contain executable code include document packages (iWork documents) and media libraries (iPhoto Library).

Bundles are programmatically accessed with the NSBundle class in Cocoa, NeXTSTEP and GNUstep's Foundation frameworks, and with CFBundle in Core Foundation. Bundles often include an Info.plist file for metadata. The Uniform Type Identifier (UTI) for an Apple bundle is com.apple.bundle.

Application bundles are directory hierarchies, with the top-level directory having a name that ends with a .app extension.

In a macOS application bundle, the first directory in the bundle underneath the top-level directory is usually named Contents. Within Contents there is usually another directory, called MacOS, which contains the application's executable code. The Contents folder contains a file named Info.plist, which contains application information, such as the software vendor's name, name of the files that contain the applications executable and icon, the version of the application, permissions requested, etc. Within the Contents folder there is usually also a directory called Resources, which contains the resources of the application.

Among other things, the Resources folder contains localized versions of the application's nib files.

Other common subdirectories include PlugIns, Frameworks, _CodeSignature and Shared Frameworks. The Frameworks directory contains frameworks used by the application, and are used even if another version of the framework exists on the system. The Shared Frameworks directory contains frameworks that can be used both by the application that contains them, and other applications; they are used only if a newer version does not exist elsewhere on the system. PlugIns contains extensible code used by the application. The _CodeSignature folder contains information used by the system to validate that the package to establish that the package originates from a trusted party, and has not been tampered with.

See all
User Avatar
No comments yet.