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

A.5. Chapter 5

A.5.1. Exercise 1 solution

  1. TextEdit's Info.plist file describes seven different document types:

    • Rich Text Format documents (called NSRTFPboardType)

    • Microsoft Word Documents

    • Rich Text Format with Attachments (called NSRTFDPboardType)

    • Plain Text Documents (called NSStringPboardType)

    • Apple SimpleText Documents

    • HTML Documents

    • Apple Web archives

  2. Preview's bundle signature is prvw.

  3. Terminal's bundle identifier is com.apple.Terminal.

  4. The exact contents of a nib file bundle will depend on what the nib file represents. Files commonly found in nibs include

    • classes.nib

    • info.nib

    • keyedobjects.nib

    • objects.nib

    Some Interface Builder files might even include images and other resources embedded within the nib bundle, but such nibs should be very rare.

  5. The current bundle version of the AppKit framework has been C throughout the Mac OS X releases to date. Note the version is a single English letter.

  6. The current bundle version of the JavaVM framework on your system depends on what you have installed. For example, if you have installed Java 1.4.2, the current version of JavaVM will be 1.4.2. Unlike AppKit, JavaVM uses traditional version numbers instead of individual English letters.

A.5.2. Exercise 2 solution.

  1. defaults domains

  2. defaults -currentHost domains

  3. defaults read com.apple.Terminal

    Recall that preferences are stored using an application's CFBundleIdentifier. You learned Terminal's bundle identifier in the preceding exercise (1c).

  4. defaults -currentHost read com.apple.HIToolbox

    HIToolbox is a framework, ...

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