Bundle (macOS)

BundleFilename extension| `.app, .framework, .kext, .plugin, .docset, .xpc, .qlgenerator, .component, .saver, .mdimporter, etc.`

|

Uniform Type Identifier (UTI)| com.apple.bundle
Container for| executable binary, metadata, other bundles, any other file needed to run the application.

In NeXTSTEP, OPENSTEP, and their lineal descendants macOS, iOS, iPadOS, tvOS, and watchOS, 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.[1] The Uniform Type Identifier (UTI) for an Apple bundle is `com.apple.bundle`.[2]

## Contents

* 1 Application bundles
* 2 macOS framework bundles
* 3 Loadable bundles
* 4 Other bundle formats
* 5 .lproj
* 6 See also
* 7 References
* 8 External links

## Application bundles

Application bundleFilename extension| `.app`

|

Uniform Type Identifier (UTI)| com.apple.application-bundle
Type of format| application software
Container for| executable binary
Extended from| 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.[3]

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.

By default, the Finder 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.[4][5]

## macOS framework bundles

Framework bundleFilename extension| `.framework`

|

Uniform Type Identifier (UTI)| com.apple.framework
Extended from| bundle

macOS frameworks are also stored as bundles;[6] 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`.[7]

The Finder 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.[8]

## Loadable bundles

Loadable bundles are bundles which contain code that can be loaded at runtime.[9] 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[10] and Apple Mail.[11][12] A feature inherited from NeXTSTEP, GNUstep has the `-[NSBundle principalClass]` interface too.

By default, the Finder 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 macOS applications which utilize their own custom bundle format (e.g. CandyBar `.iContainer`, Aperture `.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` files for a given language along with `.strings` files and images if needed (for example, ReadMe 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 analogue to an application bundle
* AppImage -- A Linux application that makes use of similar principles
* Rich Text Format Directory -- the RTF extension by Apple using bundles

## References

1. ↑ "Information Property List - Bundle Resources". https://developer.apple.com/documentation/bundleresources/information_property_list.
2. ↑ "System-Declared Uniform Type Identifiers". Uniform Type Identifiers Reference. Apple Inc.. https://developer.apple.com/library/ios/documentation/Miscellaneous/Reference/UTIRef/Articles/System-DeclaredUniformTypeIdentifiers.html#//apple_ref/doc/uid/TP40009259-SW1.
3. ↑ "Bundle Structures". Bundle Programming Guide. Apple Inc.. 2017-03-27. Application Bundles. https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html#//apple_ref/doc/uid/10000123i-CH101-SW13.
4. ↑ "PackagingDrafts/GNUstep". https://fedoraproject.org/wiki/PackagingDrafts/GNUstep#.22Fat.22_unflattened_layout.
5. ↑ "gnustep/tools-make: README.Packaging" (in en). 5 December 2021. https://github.com/gnustep/tools-make/blob/master/README.Packaging#L145.
6. ↑ "Framework". https://developer.apple.com/library/archive/documentation/General/Conceptual/DevPedia-CocoaCore/Framework.html.
7. ↑ "Bundle Structures". Bundle Programming Guide. Apple Inc.. 2017-03-27. Anatomy of a Framework Bundle. https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html#//apple_ref/doc/uid/10000123i-CH101-SW28.
8. ↑ "User FAQ". http://wiki.gnustep.org/index.php/User_FAQ.
9. ↑ Code Loading Programming Topics for Cocoa: About Loadable Bundles
10. ↑ "Pimp My Safari: plugins". http://pimpmysafari.com/plugins/.
11. ↑ "Apple Mail plug-ins and tools". http://www.tikouka.net/mailapp/.
12. ↑ "Hawk Wings -- Plug-ins for Apple Mail". http://hawkwings.net/plugins.htm.

## External links

* Bundle Programming Guide at Apple Developer Connection
* NSBundle documentation from the GNUstep project
* Platypus -- a tool to create application bundles around scripts
* File extension details

* v
* t
* e

macOS

* History
* Architecture
* Components
* Server
* Software

Versions|

* Server 1.0 Hera
* Public Beta Kodiak
* 10.0 Cheetah
* 10.1 Puma
* 10.2 Jaguar
* 10.3 Panther
* 10.4 Tiger
* 10.5 Leopard
* 10.6 Snow Leopard
* 10.7 Lion
* 10.8 Mountain Lion
* 10.9 Mavericks
* 10.10 Yosemite
* 10.11 El Capitan
* 10.12 Sierra
* 10.13 High Sierra
* 10.14 Mojave
* 10.15 Catalina

Applications|

* App Store
* Automator
* Calculator
* Calendar
* Chess
* Contacts
* Dictionary
* DVD Player
* FaceTime
* Finder
* Game Center
* Grapher
* Home
* iTunes (history)
* Launchpad
* Mail
* Messages
* News
* Music
* Notes
* Notification Center
* Podcasts
* Photo Booth
* Photos
* Preview
* QuickTime
* Reminders
* Safari (version history)
* Stickies
* TextEdit
* Time Machine

Discontinued|

* Dashboard
* Front Row
* iChat
* iPhoto
* iSync
* Sherlock

Utilities|

* Activity Monitor
* AirPort Utility
* AppleScript Editor
* Archive Utility
* Audio MIDI Setup
* Bluetooth File Exchange
* Boot Camp
* ColorSync
* Configurator
* Console
* Crash Reporter
* DigitalColor Meter
* Directory Utility
* DiskImageMounter
* Disk Utility
* Font Book
* Grab
* Help Viewer
* Image Capture
* Installer
* Keychain Access
* Migration Assistant
* Network Utility
* ODBC Administrator
* Screen Sharing
* System Preferences
* System Information
* Terminal
* Universal Access
* VoiceOver

Discontinued|

* Software Update
* Remote Install Mac OS X

Technology and user interface|

* AirDrop
* Apple File System
* Apple menu
* Apple Push Notification service
* AppleScript
* Aqua
* Audio Units
* AVFoundation
* Bonjour
* Bundle
* CloudKit
* Cocoa
* ColorSync
* Command key
* Core Animation
* Core Audio
* Core Data
* Core Foundation
* Core Image
* Core OpenGL
* Core Text
* Core Video
* CUPS
* Cover Flow
* Darwin
* Dock
* FileVault
* Fonts
* Gatekeeper
* Grand Central Dispatch
* icns
* iCloud
* I/O Kit
* Kernel panic
* Keychain
* launchd
* Mach-O
* Menu extra
* Metal
* Mission Control
* OpenCL
* Option key
* Preference Pane
* Property list
* Quartz
* Quick Look
* Smart Folders
* Speakable items
* Spotlight
* Stacks
* System Integrity Protection
* Uniform Type Identifier
* Universal binary
* WebKit
* XNU
* XQuartz

Deprecated|

* HFS+

Discontinued|

* BootX
* Brushed metal
* Carbon
* Classic Environment
* Inkwell
* QTKit
* Rosetta
* Spaces
* Xgrid

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/Bundle (macOS). Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Bundle_(macOS)&oldid=259426"
*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template