Re: Sync Services
Re: Sync Services
- Subject: Re: Sync Services
- From: Jonathon Mah <email@hidden>
- Date: Sun, 31 Dec 2006 14:36:10 +1030
Hi,
On 2006-12-30, at 17:12, email@hidden wrote:
Two Sync Services questions:
1.
I'm developing a sync system in which a "browser" application
syncs data simultaneously with a mutable list of dependent
applications (the browser app. pushes to the sync engine and
the dependent apps. pull). By mutable, I mean that the particular
list of dependent applications may change between sync occasions -
i.e. some apps-to-sync-with could be deleted from the list,
others could be added.
Has anyone experience setting up such a system? What Sync Services
methods are relevant? I've considered registering and unregistering
clients, but that seems clumsy, if not plain wrong. Or perhaps I
should
be thinking of filters?
Each application shouldn't care about any others. They all just sync
with the central Sync Services database ("The Truth"). Sync Services
deals with syncing "entities", not applications, so application A
could sync bookmarks and photos, and application B could sync photos
and address contacts, for example.
To get apps to sync "simultaneously", you register a callback when
your application launches. Using the app examples above, if app A
starts to sync its bookmarks and photos, app B will get a callback
telling it that someone else is syncing photos (but not bookmarks,
because app B doesn't deal with bookmarks).
<http://developer.apple.com/documentation/Cocoa/Conceptual/
SyncServices/Articles/AlertHandlers.html>
2.
Is it possible to sync with a predicate-style filter?
Yes.
<http://developer.apple.com/documentation/Cocoa/Conceptual/
SyncServices/Articles/Filtering.html>
Jonathon Mah
email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden