Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Bundle (macOS)

From Wikipedia, the free encyclopedia
(Redirected fromBundle (OS X))
Type of directory bundle
Bundle
Filename extension
.app, .framework, .kext, .plugin, .docset, .xpc, .qlgenerator, .component, .saver, .mdimporter, etc.
Uniform Type Identifier (UTI)com.apple.bundle
Container forexecutable binary,metadata, other bundles, any other file needed to run the application.

InNeXTSTEP,OPENSTEP, and their lineal descendantsmacOS,iOS,iPadOS,tvOS,watchOS, andvisionOS, and inGNUstep, abundle is a filedirectory 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 includeapplications,frameworks, andplugins. This kind of bundle usually contains one file representing executable code, and files that represent resources such asnibs, templates, images, sounds, and other media. On some other systems, such asMicrosoft Windows, these resources are usually included directly in the executable file itself at compile time. On older Macintoshes, a similar technique is used, where additionalmetadata can be added to a file'sresource fork. Similar in concept are theapplication directories used inRISC OS and on theROX 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 theNSBundle class inCocoa, NeXTSTEP and GNUstep'sFoundation frameworks, and withCFBundle inCore Foundation. Bundles often include anInfo.plist file for metadata.[1] TheUniform Type Identifier (UTI) for an Apple bundle iscom.apple.bundle.[2]

Application bundles

[edit]
Application bundle
Filename extension
.app
Uniform Type Identifier (UTI)com.apple.application-bundle
Type of formatapplication software
Container forexecutable binary
Extended fromBundle

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 namedContents. WithinContents there is usually another directory, calledMacOS, which contains the application's executable code. TheContents folder contains a file namedInfo.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 theContents folder there is usually also a directory calledResources, which contains the resources of the application.[3]

Among other things, theResources folder contains localized versions of the application'snib files.

Other common subdirectories includePlugIns,Frameworks,_CodeSignature andShared Frameworks. TheFrameworks directory contains frameworks used by the application, and are used even if another version of the framework exists on the system. TheShared 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, theFinder displays application bundles, which can also be referred to aspackages, 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 afat binary, so the application can be opened on many platforms.[4][5]

macOS framework bundles

[edit]
Framework bundle
Filename extension
.framework
Uniform Type Identifier (UTI)com.apple.framework
Extended frombundle

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 aVersions 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 aHeaders folder containingheader files for the framework, and other subfolders such asResources. TheVersions directory also contains a symbolic linkCurrent to the directory for the current version of the framework. In the top-level directory are symbolic links to the contents ofVersions/Current.[7]

TheFinder 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

[edit]

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 asplug-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 asSafari[10] andApple Mail.[11][12] A feature inherited from NeXTSTEP, GNUstep has the-[NSBundle principalClass] interface too.

By default, theFinder displays loadable bundles, which can also be referred to aspackages, 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

[edit]

There are many macOS applications which utilize their own custom bundle format (e.g.,CandyBar.iContainer,Aperture.aplibrary,VMware Fusion.vmwarevm, etc.).

.lproj

[edit]

An.lproj file is a bundle that containslocalization 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

[edit]

References

[edit]
  1. ^"Information Property List - Bundle Resources".Apple Developer Documentation.
  2. ^"System-Declared Uniform Type Identifiers".Uniform Type Identifiers Reference.Apple Inc. Retrieved2012-06-10.
  3. ^"Bundle Structures".Bundle Programming Guide.Apple Inc. 2017-03-27. Application Bundles.
  4. ^"PackagingDrafts/GNUstep".Fedora Project Wiki.
  5. ^"gnustep/tools-make: README.Packaging".GitHub. 5 December 2021.
  6. ^"Framework".developer.apple.com. Retrieved2020-10-06.
  7. ^"Bundle Structures".Bundle Programming Guide.Apple Inc. 2017-03-27. Anatomy of a Framework Bundle.
  8. ^"User FAQ".GNUstep.
  9. ^Code Loading Programming Topics for Cocoa: About Loadable Bundles
  10. ^"Pimp My Safari: plugins". Archived fromthe original on 2007-10-31.
  11. ^"Apple Mail plug-ins and tools". Archived fromthe original on 2009-03-08. Retrieved2007-11-04.
  12. ^"Hawk Wings — Plug-ins for Apple Mail". Archived fromthe original on 2007-08-31.

External links

[edit]
Versions
Mac OS X
OS X
macOS
Predecessors
Applications
Core
applications
Developer
Tools
Xcode
Former
Utilities
Former
Technologies,
user interface
Deprecated
Discontinued
Retrieved from "https://en.wikipedia.org/w/index.php?title=Bundle_(macOS)&oldid=1322337842"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp