Next Page > Hide TOC

Introduction to Sync Services Programming Guide

Contents:

Who Should Read This Document?
Organization of This Document
See Also


Note: This document was previously titled Sync Services.

Sync Services is a framework containing all the components you need to sync your applications and devices. If your application uses Sync Services, user data can be synced with other applications and devices on the same computer, or other computers over the network via .Mac. Ideally, all Mac OS X applications should sync user data quickly and quietly in the background. Consequently, user data is available when and where the user wants it.

Important: If your application uses the Sync Services and Address Book frameworks together, then you should not use Sync Services to sync data shared with the Address Book Framework. The Address Book Framework already syncs its records with Sync Services, so applications sharing the Address Book data do not have to (and should not) sync those records. The results are unpredictable and may result in data loss, if you attempt to sync the same data as the Address Book Framework.

Important: Sync Services is available as an Objective-C API for Mac OS X version 10.4 and later.

Who Should Read This Document?

You should read this document if you want to sync your application’s data. Types of applications include end-user applications, tools, or servers. For example, a tool may be an interface to a device (such as a phone) or a framework that maintains persistent data. You can use existing schemas for contacts, calendars, and bookmarks. You can also extend a schema or create your own schema to sync custom objects. You can use the Sync Services API from both Objective-C and C programs.

Organization of This Document

Before using Sync Services you should understand what it is used for, what the system architecture is, and what the core classes are. Because sync sessions are implemented as finite state machines, you also need an in-depth understanding of the states and transactions within a sync session. The consequences of syncing incorrectly are severe—users may lose their data—so read the following conceptual articles before using this framework. In particular, you need to read “Managing Your Sync Session” if you are writing your own sync methods.

The following articles cover common tasks and contain sample code:

An alternative approach is to use a delegation model where a driver sends messages to a data source and delegate while syncing. You can also use Core Data as the persistent store for local records and to create your schema. Read the following article to learn more about these approaches:

Read this article if you want to exclude your application preferences from syncing:

See Also

For an in-depth description of the Sync Services API, read:

If you are using or extending an Apple Applications schema, such as contacts, bookmarks or calendars, read:

If you are accessing Sync Services from a C application, refer to the Carbon example in /Developer/Examples/Sync Services and this document for more information about mixing C and Objective-C:

The /Developer/Examples/Sync Services folder contains more in-depth code examples.



Next Page > Hide TOC


© 2004, 2007 Apple Inc. All Rights Reserved. (Last updated: 2007-10-31)


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.