Bundles are a fundamental technology in macOS and iOS that are used to encapsulate code and resources. Bundles simplify the developer experience by providing known locations for needed resources while alleviating the need to create compound binary files. Instead, bundles use directories and files to provide a more natural type of organization—one that can also be modified easily both during development and after deployment.
To support bundles, both Cocoa and Core Foundation provide programming interfaces for accessing the contents of bundles. Because bundles use an organized structure, it is important that all developers understand the fundamental organizing principles of bundles. This document provides you with the foundation for understanding how bundles work and for how you use them during development to access your resource files.
Organization of This Document
This document contains the following chapters:
About Bundles introduces the concept of bundles and packages and how they are used by the system.
Bundle Structures describes the structure and contents of the standard bundle types.
Accessing a Bundle's Contents shows you how to use the Cocoa and Core Foundation interfaces to get information about a bundle and its contents.
Document Packages describes the notion of document packages (which are loosely related to bundles) and how you use them.
Although the information in this document applies to all types of bundles, if you are working with more specialized types of bundles (such as frameworks and plug-ins), you should also consult the following documents: