HOME

TheInfoList



OR:

In
NeXTSTEP NeXTSTEP is a discontinued object-oriented, multitasking operating system based on the Mach kernel and the UNIX-derived BSD. It was developed by NeXT Computer in the late 1980s and early 1990s and was initially used for its range of proprieta ...
, OPENSTEP,
GNUstep GNUstep is a free software implementation of the Cocoa (formerly OpenStep) Objective-C frameworks, widget toolkit, and application development tools for Unix-like operating systems and Microsoft Windows. It is part of the GNU Project. GNUst ...
, and their lineal descendants
macOS macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac (computer), Mac computers. Within the market of ...
and iOS, 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 Plug-in, plug in or plugin may refer to: * Plug-in (computing) is a software component that adds a specific feature to an existing computer program. ** Audio plug-in, adds audio signal processing features ** Photoshop plugin, a piece of software t ...
. 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 An application directory is a grouping of software code, help files and resources that together comprise a complete software package but are presented to the user as a single object. They are currently used in RISC OS and the ROX Desktop, and a ...
used in
RISC OS RISC OS is a computer operating system originally designed by Acorn Computers Ltd in Cambridge, England. First released in 1987, it was designed to run on the ARM chipset, which Acorn had designed concurrently for use in its new line of Archi ...
and on the ROX Desktop. Examples of bundles that do not contain executable code include document packages (
iWork iWork is an office suite of applications created by Apple Inc. for its macOS and iOS operating systems, and also available cross-platform through the iCloud website. It includes the presentation application Keynote, the word processing and ...
documents) and media libraries ( iPhoto Library). Bundles are programmatically accessed with the NSBundle class in
Cocoa Cocoa may refer to: Chocolate * Chocolate * ''Theobroma cacao'', the cocoa tree * Cocoa bean, seed of ''Theobroma cacao'' * Chocolate liquor, or cocoa liquor, pure, liquid chocolate extracted from the cocoa bean, including both cocoa butter and ...
, NeXTSTEP and GNUstep's Foundation frameworks, and with CFBundle in Core Foundation. Bundles often include an file for metadata. The Uniform Type Identifier (UTI) for an Apple bundle is com.apple.bundle.


Application bundles

Application bundles are directory hierarchies, with the top-level directory having a name that ends with a .app extension. In an 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 on Macs), which contains the application's executable code. 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, 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. By default, the
Finder Finder may refer to: * Finder (surname) * Finder (software), part of the Apple Macintosh operating system * ''Finder'' (comics), a comic book series by Carla Speed McNeil * ''Finder'' (novel), a 1994 novel by Emma Bull * Finder Wyvernspur, a fi ...
displays application bundles, which can also be referred to as packages, as opaque files with no underlying structure; the contents of the bundle can be shown with the "Show Package Contents" context menu item. GNUstep by default uses the name of the application to name the folder that contains application code. An alternative is to name them by the computer architecture and OS the code is intended for to form a fat binary, so the application can be opened on many platforms.


macOS framework bundles

macOS frameworks are also stored as bundles; the top-level directory of a framework bundle has a name that is the name of the framework followed by the extension .framework. In the top-level directory is a Versions directory, with subdirectories for one or more versions of the framework, each subdirectory containing the dynamic library code for the framework, in a file whose name is the same as the name of the framework, possibly with a Headers folder containing header files for the framework, and other subfolders such as Resources. The Versions directory also contains a symbolic link Current to the directory for the current version of the framework. In the top-level directory are symbolic links to the contents of Versions/Current. The
Finder Finder may refer to: * Finder (surname) * Finder (software), part of the Apple Macintosh operating system * ''Finder'' (comics), a comic book series by Carla Speed McNeil * ''Finder'' (novel), a 1994 novel by Emma Bull * Finder Wyvernspur, a fi ...
displays framework bundles as directories rather than as opaque files. Although GNUstep uses frameworks, they are not usually stored as bundles. This is because the full semantics of framework loading are considered too alien to other platforms.


Loadable bundles

Loadable bundles are bundles which contain code that can be loaded at runtime. Loadable bundles usually have the extension .bundle, and are most often used as plug-ins. On macOS, there is a way to load bundles even into applications that do not support them, allowing for third party hacks for popular applications, such as Safari and Apple Mail. A feature inherited from NeXTSTEP, GNUstep has the interface too. By default, the
Finder Finder may refer to: * Finder (surname) * Finder (software), part of the Apple Macintosh operating system * ''Finder'' (comics), a comic book series by Carla Speed McNeil * ''Finder'' (novel), a 1994 novel by Emma Bull * Finder Wyvernspur, a fi ...
displays loadable bundles, which can also be referred to as packages, as opaque files with no underlying structure; the contents of the bundle can be shown with the "Show Package Contents" context menu item.


Other bundle formats

There are many third-party macOS applications which utilize their own custom bundle format (e.g. CandyBar .iContainer,
Aperture In optics, an aperture is a hole or an opening through which light travels. More specifically, the aperture and focal length of an optical system determine the cone angle of a bundle of rays that come to a focus in the image plane. An ...
.aplibrary, VMware Fusion .vmwarevm, etc.).


.lproj

An .lproj file is a bundle that contains localization files for OpenStep, macOS, or GNUstep software. It typically contains the
.nib Interface Builder is a software development application for Apple's macOS operating system. It is part of Xcode (formerly Project Builder), the Apple Developer developer's toolset. Interface Builder allows Cocoa and Carbon developers to cr ...
files for a given language along with .strings files and images if needed (for example,
ReadMe "\n\n\n\n\n\n''README.txt: A Memoir'' is a 2022 memoir by Chelsea Manning. It covers her early life, experience as a soldier in the U.S. Army, and life and imprisonment after she leaked classified information to WikiLeaks WikiLeaks () is an ...
or license files). These localized files are used by installer makers to customize install packages. They are also included in an application bundle.


See also

* Application Directory — the
RISC OS RISC OS is a computer operating system originally designed by Acorn Computers Ltd in Cambridge, England. First released in 1987, it was designed to run on the ARM chipset, which Acorn had designed concurrently for use in its new line of Archi ...
analogue to an application bundle * AppImage — A Linux application that makes use of similar principles


References


External links


Bundle Programming Guide
at Apple Developer Connection

from the GNUstep project
Platypus
— a tool to create application bundles around scripts
File extension details
{{DEFAULTSORT:Application Bundle NeXT MacOS MacOS development GNUstep