The Cocoa Advantage

MacOS can run two different kinds of programs, each with different characteristics: Cocoa and Carbon.

These were the two kinds of apps that software companies could create for the Mac when OS X first appeared. Those companies could either update their existing programs, using a conversion kit called Carbon, or they could rewrite their programs from scratch, using Apple’s Cocoa tools.

The two resulting kinds of programs look identical, but Cocoa apps offer a number of special features that Carbonized programs don’t offer. (Almost all of Apple’s own included apps are Cocoa apps, including the Finder, TextEdit, Mail, and so on.)

Here are some of the advantages that only Cocoa programs offer. May it clear up any confusion you have about why certain features seem to be present only occasionally.

The Fonts Panel

The Mac has always been the designer’s preferred computer, and macOS only strengthens its position. For one thing, macOS comes with over 200 beautiful fonts that Apple licensed from commercial type companies.

When you use a Carbon program, you usually access these fonts the same way as always: using a Font menu. But when you use a Cocoa program, you get the Fonts panel, which makes it far easier to organize, search, and use your font collection. Chapter 15 describes fonts, and the Fonts panel, in more detail.

Retina Friendliness

In general, Cocoa programs automatically sharpen up their text when you view it on a Retina Display—Apple’s name for super-high-resolution ...

Get macOS Sierra: The Missing Manual now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.