|
|
< Previous PageNext Page > |
A bundle is a directory in the file system that stores executable code and the software resources related to that code. (It can contain only executable code or only software resources, but that is unusual). The bundle directory, in essence, “bundles” a set of resources in a discrete package. The resources include such things as images, sounds, and localized character strings that are used by some piece of software. Because code and associated resources are in one place in the file system, installation, uninstallation, and other forms of software management are easier.
Applications, frameworks, and loadable bundles (including
plug-ins) are types of bundles. Internally, the structure of these
bundle types is (or can be) quite similar. What primarily differentiates
applications, frameworks, and loadable bundles are the characteristics
and purpose of the executable code they contain. Each of these types
has its own required extension: .app
, .framework
,
and .bundle
(or whatever
extension is application-defined for a loadable bundle).
In a program, bundles are represented by programmatic entities such as instances of a class or (in procedural languages) objects of opaque types. Routines of these entities make bundle resources available to the program code that requests it. Other routines enable you to load and link executable code into a running application. Applications can load the code in loadable bundles whenever they need that code. Frameworks automatically—and dynamically—load and link shared library code.
Bundles can contain multiple sets of resources, each set of which groups resources by language, locale, and platform. By combining these sets of resources and executable images into a single package, you can create one version of your application, framework, or plug-in that executes properly on any supported platform. Using this model, you can automatically localize an application’s human interface according to the user’s language preferences.
Typically the Finder displays a bundle directory to users as a file to avoid unwarranted tampering with the bundle’s contents. But the directory structure of some bundles, such as frameworks, is not hidden. Whether the Finder displays a bundle as a file or folder depends on several factors, including whether the bundle bit—a Finder attribute—is set in the bundle directory. Finder also hides the extensions from all application bundle names .
Benefits of Using Bundles
Anatomy of a Bundle
The Finder and Bundles
Types of Bundles
Localized Resources
Localized Character Strings
Search Algorithm
Bundles and the Resource Manager
< Previous PageNext Page > |
Last updated: 2003-08-21
![]() |
![]() |
![]() |
![]() | ||
![]() | ||
Get information on Apple products.
Visit the Apple Store online or at retail locations. 1-800-MY-APPLE Copyright © 2003 Apple Computer, Inc. All rights reserved. | Terms of use | Privacy Notice |