Listing 1 shows that the top-level symbolic links don’t point directly to items inside the Versions/A directory. It contains both the executable and the resources used by the framework.
The reason for the symbolic links is that directory Versions/A contains the actual contents of the framework. Both MyFramework and Resources are symbolic links to items in Versions/A. In this listing, the Versions directory is the only real directory at the top level of the bundle. MyFramework -> Versions/Current/MyFramework Listing 1 shows the basic directory structure of the resulting bundle. When you build a new framework project in Xcode, the build environment creates a versioned bundle structure for you automatically. Nonlocalized resources reside at the top level of the Resources directory. These subdirectories hold strings, images, sounds, and interface definitions localized to the language and region represented by the directory. (See “Anatomy of a Modern Bundle” in Bundle Programming Guide for more information.) Localized resources are put in language-specific subdirectories that end with the. The contents of the Resources directory are similar to those for application bundles. The link points to the most current version of the Resources directory, buried somewhere inside the bundle. In fact, the system frameworks that come with OS X have a symbolic link to the framework’s Resources directory in this location. The actual Resources directory does not have to reside physically at the top-level of the bundle. Inside the Resources directory is the ist file that contains the bundle’s identifying information. framework extension on its directory name and by the Resources directory at the top level of the framework bundle. The system identifies a framework by the. Supporting multiple versions of a framework allows older applications to continue running even as the framework binary continues to evolve. This type of bundle is known as a versioned bundle.
#MAC OS FRAMEWORK VS LIBRARY CODE#
The structure for frameworks is based on an earlier bundle format, and allows for multiple versions of the framework code and header files to be stored inside the bundle. Framework Bundle Structureįramework bundles use a bundle structure different from the bundle structure used by applications. This openness makes it easy for developers to browse any header files and documentation included with the framework. framework extension, and unlike most other bundle types, a framework bundle is presented to the user as a directory and not as a file. The framework bundle directory ends with the. Umbrella frameworks add minor refinements to the standard framework structure, such as the ability to encompass other frameworks.įrameworks are packaged in a bundle structure. Both types of framework feature the same basic structure and can contain resources such as a shared library, nib files, image files, strings files, information property lists, documentation, header files, and so on. In OS X, shared resources are packaged using standard frameworks and umbrella frameworks. Next Previous Anatomy of Framework Bundles