In addition to the main bundle and the bundles of linked-in frameworks, an application can be organized into any number of other bundles. Although these loadable bundles usually reside inside the application file package, they can be located anywhere in the file system. Each loadable-bundle folder--by convention, with a
.bundle
extension--is represented in the application by a separate CFBundle object. Through this object the application can dynamically load the code and resources in the bundle when it needs them. For example, an application for managing PostScript printers may have a bundle containing PostScript code to be downloaded to printers.
The executable code in loadable bundles can be dynamically linked into an application while it runs. Using the code-loading programming interfaces provided by CFBundle Services, functions from loadable bundles can be looked up by name and called through function pointers. This newly linked code can then use a bundle identifier to obtain an instance for its bundle. Through this bundle instance, the code can locate and load additional resources packaged in the bundle.