Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

< Previous PageNext Page > Hide TOC

Viewing Sync Session Results

You can also use Syncrospector to view the results of a sync session—for example, you can view the changes to the truth database and even the call history of a sync session. Before you can view this information, you need to set some preferences in Syncrospector.

Contents:

Setting Syncrospector Preferences
Syncing SimpleStickies
Viewing the Client State
Viewing the Truth Database
Viewing the Call History


Setting Syncrospector Preferences

The following preferences are useful when using Syncrospector to debug your applications. You will need to set these preferences before syncing your application to examine the call history.

  1. Launch Syncrospector, located in the StickiesExample/Applications folder.

  2. Select Preferences from the Syncrospector menu.

  3. Select “Show status in menu bar.”

  4. Select “Extensive logging.”

  5. Select “SyncServices.framework call history.”

  6. Restart SimpleStickies.

Note: When you are done debugging, you can remove the save.isyncplayback and syncservices.log files located in ~/Library/Application Support/SyncServices/Local. Remove the log files only after "Extensive logging" and "SyncServices.framework call history" are turned off in the Syncrospector Preferences panel and Syncrospector is no longer running.

Syncing SimpleStickies

Add and sync a few note records using SimpleStickies as follows:

  1. Launch SimpleStickies to create a few note records by clicking the Add button below the table.

  2. Select a note record in the table, and set a few properties of the note records in the detail interface—for example, enter some text in the Text field, and change the color of each note record.

  3. Select Sync from the File menu to save a local copy of the records and push them to the sync engine.

  4. If a panel appears asking whether you would like to sync SimpleStickies with other applications—for example, FancyStickies—click Allow.

    A panel may appear if you skipped ahead and ran FancyStickies. When you first sync a client that shares a schema with another client, a panel appears asking whether you want to sync with other clients. If you click Allow, the panel does not appear again unless you unregister the client.

Viewing the Client State

First, you should check to see that the client synced and that it is in the right state for the next sync.

  1. Launch Syncrospector, and select Clients from the left-side pull-down menu. Notice that the Last Sync date for SimpleStickies changed.

  2. Select SimpleStickies from the table, and click Sync State in the detail view. The detail view shows that SimpleStickies successfully synced the com.mycompany.stickies.Note entity and is expected to fast sync the next time.

Read Sync Services Programming Guide for details on the negotiation phase and sync modes.

Viewing the Truth Database

You can also check to see whether your records were pushed. To do this, examine the contents of the truth database using Syncrospector.

  1. Using Syncrospector, select Truth from the left-side pull-down menu.

  2. Click Reload if Syncrospector was running when you synced and the table is empty.

  3. Display the Note entities by entering com.mycompany.stickies.Note in the search field.

    The records you created should appear in the table.

  4. Select a record to view details.

  5. Click Properties in the detail view to view the record’s property values.

  6. Click Client States to view the different clients that synced this record.

    Note that the truth database uses a global record identifier that is different from the SimpleStickies local record identifier. Local identifiers are different for each client.

Viewing the Call History

You can also use Syncrospector to view the call history of a sync session.

  1. Using Syncrospector, select History from the left-side pull-down menu.

  2. Select the last sync session from the list and click the outline triangle.

    The list expands to show the clients that participated in that sync session.

  3. Select the com.mycompany.SimpleStickies client from the list.

    If other clients have joined the sync session, they are also listed here. If changes were pushed to the sync engine, they are listed in the detail view below.

  4. While the client is selected, click Open Call History to see the history of messages sent from the client to the sync engine during that session.

For a complete description of sync session states, read Sync Services Programming Guide. For a description of each method, read Sync Services Framework Reference.



< Previous PageNext Page > Hide TOC


Last updated: 2007-07-11




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.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice