Core Foundation Bundle Services

Software developers are faced with an increasing need to design applications that are both highly portable and easily localizable. Efficient resource management is critical to the construction of such applications. Core Foundation Bundle Services provides developers an elegant means of organizing and locating many types of application resources including images, sounds, localized strings, and executable code.

Bundle Services consists of the Core Foundation opaque type CFBundle along with its associated programming interfaces, and a corresponding folder on disk where related resources are stored. The folder, in essence, "bundles" a set of resources used by an application into convenient chunks, and the CFBundle "object" makes those resources available to the application. The term bundle refers both to the object and to the folder it represents. Applications, frameworks, and plug-ins are all types of bundles.

In addition to packaging the standard resource types (images, sounds, and localized character strings, for example) bundles are frequently used to package code that will be dynamically linked into an application. Bundle Services provides functions to dynamically load the code and search for functions by name. Because Core Foundation is intended to run on multiple operating systems and CPU architectures, the code loading API insulates you from having to care about the executable format of the bundle's code. Without Bundle Services, not only do you have to know what format your executable is in, you also have to use a different set of programming interfaces to deal with each type of binary. Fortunately Bundle Services knows how to load and link your code on any of the supported platforms, leaving you free to concentrate on more important matters.

Bundles can contain multiple sets of resources, each of which is grouped according to language localization and platform. By combining these sets of resources and executable images into a single application package, you can create one version of your application, framework, or plug-in that will execute properly on any supported platform, and automatically localize its human interface according to the user's system language preferences.

Header Files:

CFBundle.h

Core Foundation Bundle Services Concepts

Core Foundation Bundle Services Tasks


© 1999 Apple Computer, Inc. – (Last Updated 07 September 99)