Apple Developer Connection
Advanced Search
Member Login Log In | Not a Member? Support

Tiger Developer Overview Series: Mac OS X v10.4 Tiger

The latest version of Apple's powerful UNIX-based operating system, Mac OS X v10.4 Tiger, is the most important release for developers since Mac OS X was first released in 2001. Tiger is loaded with a number of cutting edge technologies that translate into new and interesting opportunities for almost every type of developer. In fact, developers have already found innovative ways to use the powerful new features, APIs, and frameworks available in Tiger.

This article highlights some of the most exciting new technologies in Tiger and shows what they will mean for developers. They are:

  • Spotlight
  • Dashboard
  • 64-bit Development
  • Xcode 2.0
  • Automator
  • Core Image
  • Core Data

As well, there are a few other features that we'll tell you about and we'll give you details on how you can get started developing applications for Tiger. Let's dive into the list starting with Spotlight.

Spotlight

Showing up prominently as an icon on the top right of the menu bar, Spotlight is the first new feature of Tiger that most end users will notice. As detailed on the Mac OS X Tiger site, it offers fast and intuitive searches across all of the data on your system. Spotlight, and many of the other new features in Tiger such as Smart Folders, is built on an underlying set of system services that collect, update, and index both the contents and the meta-data of the files on your system.

In a nutshell, every time a file is saved, it is examined for meta-data and content, which is then placed into an indexed database. Then, when a Spotlight search is executed, the database is queried and returns the path of every file that matches. The beauty of this approach is that it requires no changes to applications or data formats. The way Spotlight technologies work is shown in Figure 1.

Spotlight diagram

Figure 1: Operation of Metadata store.

The potential uses of this technology for developers are nearly boundless. For example, an application that cataloged images could find all of the images in a user's Home folder and work with them. Or imagine an application that works with contacts; Spotlight could display files and other items relevant to a particular person.

Tiger comes with importers for a variety of common file formats. It can import meta-data from JPEG, PNG, TIFF, and GIF image files, MP3 and AAC audio files, QuickTime movies, PDF files, iChat histories, email, contacts, calendars, and more. If your application saves files in its own custom format, you'll want to expose the meta-data from those files to users on the system through Spotlight. In order to do that, you need to provide a Spotlight Importer plug-in with your application. This consists of using the Spotlight Importer template in Xcode and implementing a single function that is bundled into a plug-in for the Spotlight system.

For a more in-depth explanation of Spotlight search technologies and how developers can leverage them, see Working with Spotlight.

dashboardDashboard

One of the coolest new features in Tiger is the Dashboard, a new way for Mac users to get fast access to information and functionality they use frequently. The Dashboard is home to Widgets, mini-applications that provide a very simple, tightly focused interface for common tasks. They're lightweight (launch quickly), very simple, and very easy to use. Widgets can stand alone, complement the functionality of a larger and more powerful application, display information from the Internet, and a lot more.

Tiger's Dashboard uniquely combines a variety of Mac OS X technologies in a powerful new way:

  • The Dashboard appears and disappears with the press of a button or a simple mouse gesture, using a visual effect similar to Exposé. This makes Widgets instantly accessible, but keeps them out of the way.
  • Widgets are based on the Web Kit. Anyone who can weave HTML markup with CSS (Cascading Style Sheets) and JavaScript can write a Widget.
  • The advanced drawing capabilities of Quartz are exposed to the Web Kit environment through a set of modular extensions to HTML. This will let you draw beautiful user interfaces using JavaScript.
  • Widgets support plug-ins, so you can drop down to Cocoa and Objective-C and access the functionality of your own native code or any other system code. And from Cocoa, you can access any other functionality on the system.

The ease with which you can create a Dashboard Widget will allow you to create many interesting Widgets very quickly. For example, imagine a continuous build system that checks out, builds, and tests that your application is running somewhere on a network. You could monitor the error messages from the build server using a Widget. Clicking a link on the Widget could open the file in Xcode so you could immediately fix the problem and resubmit the build. With the capabilities of the Web Kit, Quartz, and Core Image, the possibilities for Widgets are endless.

For a more in-depth explanation of Dashboard and how you can build Widgets, see Developing Dashhboard Widgets.

G564-bit Development

The 64-bit support in Tiger enables the 64-bit addressing for the next generation of data-intensive applications, such as those working with gene sequencing, advanced medical imaging, and geospatial applications. To give an example of the kinds of data that can be represented with 64 bits, imagine that you are working with a dataset in which the road area of the Golden Gate bridge can be represented in 32 bits. Sixty-four bits of address space gives you the capacity to model the entire surface area of the earth at the same resolution. In addition, LibSystem and many of Apple's optimized math libraries will support 64-bit addressing in Tiger, making it easy for developers to harness the full computational power of the PowerPC G5 as well as very large amounts of memory. As you probably know, at the heart of the Power Mac G5 and the new iMac G5 is the PowerPC G5 processor, a fully capable 64-bit processor. It sports 64-bit registers, can perform 64-bit arithmetic operations, and can give the operating system access to greater than 4GB of main memory. In fact, it gives you access to 16 exabytes of virtual memory, and as much physical memory as you can put in your Mac.

Unlike some other CPU architectures, there is no performance penalty for running 32-bit applications on the G5. This is because the PowerPC architecture has always been defined as a 64-bit architecture with a 32-bit subset, allowing a seamless migration between 32-bit and 64-bit hardware. Even better, 32-bit applications can take advantage of many 64-bit features, such as 64-bit math and registers. This has allowed Apple to make a smooth transition between architectures. For example, there is only one version of the kernel for all Apple hardware.

Mac OS X Tiger's 64-bit support opens the door to the next level of applications—the ones that couldn't be built until now.

For a more in-depth explanation the 64-bit capabilities of Tiger, see Developing 64-bit Applications.

Xcode 2.0

Xcode 2.0, the second major version of Apple's developer toolset, brings several new features as well as solid improvements to the overall product. The most noticeable new feature is the new visual modeling tool. You can select a set of classes in your project and Xcode will create a visual class hierarchy diagram that not only reflects your code, but lets you navigate it as well. And when you change the code, the class diagrams will keep up. These diagrams aren't just limited to classes for which you create code. They are also used to manipulate data entities that are created and managed by Core Data.

Modeler screenshot

Figure 3: The Xcode class modeler in action.

Another new feature in Xcode 2.0 is graphical remote debugging. For many applications, the best way to debug a problem is to run the application on the same machine on which the developer is working in Xcode. But when working on full-screen applications, such as games, or debugging event handling, remote debugging gives you the ability to run an application on another machine and have access to most of the same debugging features you are used to having.

Along with improvements to the GUI, Xcode 2.0 will ship with GCC 4.0 which features a new C++ Parser and several code generation improvements including auto-vectorization. While hand-tuning Velocity Engine code can get you the maximum performance from the G4 and G5 processors, now you can have GCC do the heavy lifting for you. You'll benefit from this without any extra effort, with auto-vectorization in GCC bringing anywhere between a 4X and 14X performance improvement to code that works with arrays of data.

To learn more about the new Xcode 2.0, see Working with Xcode 2.0.

Automator

AppleScript has long allowed users to combine the abilities of multiple applications in new and unexpected ways. Automator takes AppleScript's application integration technologies a huge step further. With Automator, end-users can drag-and-drop actions from various applications into a single, saveable workflow. It's similar to writing shell scripts and piping the output of one command-line tool to another with pipes, but with a visual interface.

Automator screenshot

Figure 4: Actions chained together in Automator.

As a developer, you'll find that it is easy to build your own actions with either AppleScript or Cocoa. This lets you provide whatever functionality you can dream of in a small byte-sized unit for other people to use in their workflows. For example, in a corporate environment, you could build an action that would grab data from a variety of internal websites, create a report out of that data, and then send the report to all the members of a team. Some of the actions to perform this workflow would be the standard ones that come with Automator. Others could be custom actions that you create.

Automator also comes with a host of actions that will be useful to developers. For example, you'll be able to create a workflow that produces a deployable build of your project, creates an installation package with the result as well as a few other files, and then compresses it to a DMG file that you can upload to your web server.

To learn more about Automator, see Working with Automator.

Core Image

Over the last few years, the Graphics Processing Units (GPUs) on state-of-the-art video cards from ATI and Nvidia have been outpacing Moore's law, doubling performance every six months. Today's GPUs have amazing floating-point power, with the new GeForce FX 6800 able to process over 6 billion pixels a second. This massive increase in computational power opens up new opportunities for developers, because video cards can now efficiently perform per-pixel processing that previously was bound to the CPU.

Enter Core Image, a robust framework in Tiger for ultra-fast high-precision image processing, from basic operations such as color adjustments all the way to advanced high-motion visual effects. Core Image leverages OpenGL to provide a state-of-the-art image processing environment, making it easier for you to take advantage of the power of today's programmable GPUs as well as the Velocity Engine in the PowerPC G4 and G5 CPUs. Core Image compiles image processing programs—or kernels—at runtime, globally optimizing across multiple kernels and taking advantage of the GPU whenever possible. It can also dynamically generate optimized code for SMP CPUs in cases where a high performance GPU is not available.

Another powerful developer feature is the plug-in architecture provided by Core Image. This architecture provides applications easy access to filters, transitions and effects packages called Image Units—simple plugins that encapsulate a pixel processing kernel. Image Units are written using the CIKernel language, a derivative of the OpenGL Shading Language optimized for image processing. And these Image Units can be shared across any Core Image host application, reducing development complexity.

Core Image diagram

Figure 5: Samplers and a kernel assembled into a processing pipeline.

As Figure 5 illustrates, each image in the processing pipeline requires a sampler object to handle the details of getting pixels from the image, packaging the pixels properly, and passing the pixels to the kernel for processing. Your source images remain untouched, providing nondestructive image processing.

When assembling an image processing pipeline, you can choose from dozens of Image Units built into Tiger, which include blurs, distortions, sharpeners, and various transitions. Or you can easily create your own Image Units for use in your own or other Core Image host applications.

To learn more about Core Image and Image Units, see Developing with Core Image.

Core Data

Cocoa has long provided a world-class solution for application user-interface development. And in Panther, Cocoa started providing pre-built controller objects (the "Bindings" layer) to connect various UI elements together with data models. Now in Tiger, Cocoa can manage your data objects themselves through the power of Core Data, providing automatic undo/redo support, additional user interface synchronization, and data consistency, correctness, and speed enhancements when it's time to write to disk.

Core Data gives you the ability to create a description of your data objects. Once defined, Core Data handles most of the heavy work of managing your data objects, both in-memory and on-disk. This allows you to focus on application logic and avoid the infrastructure work. In short, Core Data is a model-driven object management graph and persistence framework.

Core Data diagram

Figure 6: Core Data in action

In Tiger, Core Data supports three different kinds of files for storage of data:

  • A text-based XML file format
  • A better performing binary file format
  • A high-performance, SQLite-based database file format

Each of these file formats has its strengths. The XML file format is a good choice during the development of an application as it allows you to peek inside the file and see what is going on. The SQLite format will often be the best choice for desktop applications because of its performance characteristics.

For a more in-depth explanation of Core Data and how you can use it in Cocoa applications, see Developing with Core Data.

Additional Technologies

Of course, there are many more technologies that make their debut in Tiger. Too many, in fact, to list them all here, but some highlights include:

Universal Access and VoiceOver

The Universal Access capabilities of Mac OS X are enhanced in Tiger to include VoiceOver, a new spoken interface. Designed for those with visual and learning disabilities, it reads aloud the contents of documents such as web pages, Mail messages, and word processing files. As an integrated part of Tiger, Apple has also provided a set of programming guidelines so that you will be able to make sure that your application can deliver the best VoiceOver experience.

H.264/AVC

Also known as MPEG-4 Part 10, H.264/AVC is a very efficient and scalable video technology that produces higher quality video at lower data rates for everything from 3G mobile phones to HD (High Definition) television. Even better, it's built into QuickTime in Tiger. This means that any application you build that takes advantage of QuickTime can take advantage of this powerful new video technology.

Sync Services

Introduced in Jaguar, iSync brought the concept of synchronizing contacts, calendars, and bookmarks between multiple computers and their associated iPods, cell phones, PDAs, and other devices. In Tiger, the idea of synchronizing your data is generalized into the operating system and is controlled via a System Preference panel. As well, the functionality of comparing and reconciling changes in data has been exposed in a new framework, Sync Services.

PDFKit

Since it was first released, Mac OS X has been able to read and write PDF files. Now, the ability to create, read, and manipulate PDF files programmatically is being delivered to you via the new PDFKit API. Similar in spirit to Web Kit, PDFKit is a suite of Cocoa classes that gives you access to, and the ability to create, the various parts of a PDF document.

What All These Features Mean to You

There's a common theme that runs through all of these new technologies in Tiger: Allowing developers to focus on writing application-specific code. You as a developer shouldn't have to reinvent the wheel to implement the features that Mac users expect. Instead, Apple is providing a set of rich frameworks that take care of many facets of application development so that you can focus on your applications and what you do best.

Even better, since Apple is relying upon all of these technologies for building Mac OS X as well as its own applications, you can be sure that they are well tested. Instead of being designed for hypothetical problems, they are the result of designing functionality for real-world problems.

How You Can Get Started

Getting started couldn't be easier. The first thing you should do, if you haven't already, is to become an Apple Developer Connection member. A free ADC Online membership provides access to the latest Xcode updates and other developer tools. An ADC Select Membership goes further by providing shipping versions of Mac OS X Tiger and Xcode 2 on disc, along with download access to Mac OS X Tiger Server. Select membership also includes direct, one-on-one consultation with Tiger support engineers, a discount on hardware through the ADC Hardware Purchase Program, and ongoing access to pre-release software.

Next, you'll want to set yourself up with the Xcode 2.2 developer tools. It ships as part of each and every copy of Mac OS X Tiger on the Install DVD. Just double-click on the Xcode 2.2 package on the DVD and the developer tools—as well as a set of example code projects and comprehensive documentation in the ADC Reference Library—will be installed on your system. The documentation and sample code will help you learn more about the technologies covered in this article.

Updated: 2006-03-06

Choose your language: