|
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
There isn't any API to do this. This is arguably an oversight in the API.
One way to solve this problem is to register 3 different sync clients that sync each data class. Each of these clients can be handled by the same code, but you would know which data class is being synced based on the client id of the client that your callback is invoked with. There are some performance arguments that could be made to go this route.
Another less desirable solution is that you set the entities you are syncing with in the client info of the ISyncClient. For example before your call to beingSessionInBackgroundWithClient you could do something like: [client setObject: entityNames forKey:@"EntitiesBeingSynced"]. I am pretty sure your alert handler won't be called when there is an active sync plan. However, this kind of solution makes me a little nervous since there is the possibility that this could change.
Hope that helps.
Bruce
On Nov 6, 2008, at 11:46 AM, Peter Walling wrote:
_______________________________________________Hi,
I have set up a sync alert handler where the handler supports 3 data classes, contacts, calendar and bookmarks. When something changes in one of these, say someone added a contact to the Address Book, my handler receives an array of contact entities to be synched. I then take the array of entities and pass it to beginSessionInBackgroundWithClient. Does anyone know a way of accessing this array in the selector method you provide to beginSessionBackgroundWithClient. It would really be helpful to know what entities in particular Mac Sync Services wants me to sync when my beginSession method is called.
I thought about enabling and disabling the entities based on the request from Sync Services but reading the doc made this seem inappropriate.
Any help would be greatly appreciated.
Thanks,
Peter
Do not post admin requests to the list. They will be ignored.
Syncservices-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
%(user_optionsurl)s
This email sent to %(user_address)s
_______________________________________________ Do not post admin requests to the list. They will be ignored. Syncservices-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: %(user_optionsurl)s This email sent to %(user_address)s
| References: | |
| >sync alert handler and beginSessionInBackgroundWithClient (From: "Peter Walling" <email@hidden>) | |
| >Re: sync alert handler and beginSessionInBackgroundWithClient (From: Bruce D Nilo <email@hidden>) |
| Home | Archives | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2011 Apple Inc. All rights reserved.