The first article in this series presented a high-level overview of the new Sync Services offered in OS X 10.4: "Tiger." In this article, Marcus Zarra drills down into an actual example of how to utilize this interesting new service and synchronize an application's data with the data stored in one of Apple's applications.

Editor's Note: This is part 2 of a 3-part series. Be sure to also ready part 1, Syncing Your Data the Cocoa Way and part 3, "Building on Apple Sync Services" (posting on September 8).

Like this article? We recommend

Like this article? We recommend

In this article, I will present how to utilize Tiger’s sync services to
keep an application in sync with the bookmarks stored in Safari. Although this
example walks through synchronizing bookmarks, it does cover all the basic
portions of syncing with an existing application and can be used as a base for
building a synchronizing application against any of the existing applications
from Apple or from any other vendor who has been kind enough to publish their
schema.

Overview

If an application is interested in using the sync services of Tiger, it must
first register a client with the truth database so that it can be invited to
participate in sync sessions. In addition, registering the client lets the truth
database know what data the application is interested in. Once a client is
registered, the truth database will keep track of what data has been pushed to
the application and what changes still need to be pushed.