O'Reilly logo

Beginning Mac OS® X Programming by Drew McCormack, Michael Trent

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. The Application

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, and other resources. An application can even include files that translate the user interface 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 at the file level 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 were single files, giving you the flexibility of a directory tree with the convenience of a file.

Although applications themselves are self-contained, they do store some data in other ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required