WHAT YOU WILL LEARN IN THIS CHAPTER:
How applications and other bundles are structured
What kind of files you find in a bundle
How application preferences are stored
Mac OS X applications seem simple enough. They appear with friendly icons that bounce in the Dock when you launch them, display a window or two, and then you're on your way. If you want, you can move the application out of the system-wide
/Applications directory and into a folder of your choosing. You can even drag some applications into Mail or iChat to send a copy to your friends!
But in reality, Mac OS X applications are sophisticated things. They are composed of executable code, a user interface (UI), and other resources. An application can even include files that translate the UI into other languages. When packaged correctly, an application looks and feels as if it really were a single file. This packaging scheme is called a bundle, or sometimes wrapper or package.
Bundles organize executable code and other resources by storing files in a special directory tree. The bundle format can store resources for specific languages and countries (called localizations) as well as resources that are language-independent. Bundles can also store executable code for various platforms, allowing the system to pick a specific version of a program based on the system on which it's running. The Finder, Dock, and other Mac OS X programs treat bundles as if they are single files, giving you the flexibility of a ...