Bundles and Packages in Mac OS X

    The article was added by Michaela Geronova at 09/25/2008.

  Submit | About | Contact & Privacy Policy

You are here: Articles Directory » Mac OS

Bookmark and Share

When Apple moved to Mac OS X, it wanted to avoid the use of resource forks while still retaining the ability to make complex items appear as single icons. Instead of creating a new container technology, Apple simply modified an existing file system container, the common folder. A bundle is nothing more than a normal folder that is used to group related resources in one location. Packages take this concept a step further: A bundle with the bundle file attribute set appears as single opaque item in the Finder and is known as a package.

This package-based approach allows software developers to easily organize all the resources needed for a complicated product into a single package, while simultaneously making it harder for normal users to interfere with the resources. Where a user sees only a single icon in the Finder representing an application, in reality it is a folder potentially filled with thousands of resources. If you encounter a folder with a name that appears to be a file extension, you are probably looking at a bundle. For example, /System/Library/Frameworks/Cocoa.framework/ is a bundle that contains multiple items related to that software, but it appears as a normal folder. The contents of a package, on the other hand, are revealed only when you right-click (or Control-click) the package and choose Show Package Contents from the shortcut menu.

From a deployment perspective, the use of bundles and packages in Mac OS X presents another dilemma. On the one hand, bundles and packages simplify deployment because otherwise complex items can be managed as single items. Thus, you can copy an entire application and all its accompanying resources by simply copying a single icon. On the other hand, bundles and packages are treated as normal folders by third-party systems and transfer mechanisms, which in many cases means that the bundle-bit attribute will be stripped away, and the once-opaque package will appear as a folder in the Finder. This will prevent the package from opening as intended. Further, it confuses users because they will see a folder instead of an application icon, which can also lead to accidental partial copies if they don’t know to copy all the items.

Using File Containers

To work around these several show-stopping issues that prevent you from successfully using many third-party tools to store or transfer items with Mac-specific file elements, you can place items that you intend to deploy inside file containers. Containers are special files that can encapsulate other files, folders, or even entire file systems. From the outside, a container file appears as a simple monolithic data file that is easily stored and transferred via any method. The contents of the container file, however, can be as varied and complicated as your deployment requires. Container file formats can have other features that make them extremely attractive for deployment use. For example, most container file formats use some form of data compression. Throughout this article you will be introduced to other benefits of using file containers for deployment.

Mac OS X has two built-in file container technologies that allow you to safely deploy items containing file attributes, resource forks, bundles, and packages:

- Archive file This container file type allows you to store individual or multiple files and folders in a single compressed monolithic file.

- Disk image This container file type allows you to store the contents of an entire file system in a single monolithic file. There are many disk image variations and options.

The container files created by these technologies can be safely stored and transferred using nearly any deployment mechanism.

Choosing the Format for Deploying Items

With the archive and disk image container formats, you have a total of three possible formats for deploying items: traditional drag and drop, archived files, and disk images. Consider the following pros and cons before choosing a deployment format:

Drag-and-Drop Deployment

Pros:

- Doesn’t require any encoding or decoding.

- Doesn’t require any special tools on any system. - Simple for inexperienced users.

Cons:

- Mac OS X file elements may not be preserved if storing or transporting using thirdparty mechanisms.

- Multiple items may not be transferred properly when using certain third-party mechanisms, as related items may become separated and lost during the transfer.

- No default file checksums to verify content.

- No default compression, thus no storage or bandwidth savings.

- No default encryption to secure content.

Mac OS Disclaimer

  • The ArticleCity.info articles directory team is not responsible for falsehoods, inaccuracies, or any other types of misinformation this article may contain and will not be liable for any damage or loss suffered by a user through the user's reliance on the information gained here.
  • ArticleCity.info articles directory is not responsible for any and all copyright infringements by writers and authors. If you suspect the information contained by this page for any copyright infringements, please contact us and we'll investigate the specific article(s) and we will remove the copyrighted material.
Other Mac OS articles
Print Queue of Snow leopard quick how to - The Print Queue Each printer that has been added to the printer list has a Print Queue. A Print Queue is a temporary storage location that is used when you print to a printer. When you print to a printer, the information is...
Printers in Snow Leopard and Gutenprint - Printers Printers come in varying shapes, sizes, and configurations. As the primary output device on your computer, the printer becomes an important tool for converting the digital information on your computer to ink on paper. ...
Printer sharing in Snow Leopard OS - Printer sharing Printer sharing allows you to share a single printer that is already set up on a computer with other users on your network. This allows the budget-conscious consumer to avoid buying a separate printer for each c...
Top Sites is a new feature in Safari 4 - Top Sites Top Sites is a new feature in Safari 4. that displays a wall of recently visited web sites and a thumbnail of each site for easy identification of those sites. As you browse the Web, Safari learns which web sites are ...
Safari usage in Snow Leopard and Internet interface - Using Safari Snow Leopard operating system introduces a brand-new version of the Safari web browser. Safari, now at version 4, introduces significant speed improvements and takes advantage of the latest hardware f...
Time machine usage for backups under Snow Leopard - Using Time Machine Snow Leopard operating system’s Time Machine feature allows you to automatically back up your entire system. It keeps an up-to-date copy of everything on your Mac, and enables you to easily go back in time...
How to access the internet if you have Snow Leopard - Internet access Internet access refers to the ability of your computer to access the Internet, which allows you to browse web sites, check e-mail, and much more. The method by which you access the Internet from your home or off...
Optimizing NetBoot server Performance - Optimizing NetBoot Performance The NetBoot service, and network-based system deployment in general, is among the most demanding services you can subject your network and servers to. Therefore, before setting up your NetBoot ser...
NetBoot Shadow Files and Diskless Mode - NetBoot Shadow Files and Diskless Mode Many clients can read from the same NetBoot image, but when a client needs to write anything (such as print spools, browser caches, and other temporary files) back to its startup volume, N...
NetBoot Requirements and NetBoot Startup Process - NetBoot Requirements The requirements for NetBoot to function properly depend on the version of your NetBoot system images and scale of your deployment. If your NetBoot images contain Mac OS X v10.5 or Mac OS X v10.5 Server, the cl...