views:

65

answers:

1

Hi Everyone:

I am looking for some way to sync a online XML file with my iPhone application and only download the newest changed items. Each item is marked with a date attribute, so I assume this is possible. I have heard that Core Data can accomplish this task, but I am unsure of the suggested method and how to approach implementing it.

Thanks for any help.

A: 

Apple does have a Sync Services framework but it isn't currently available in the iPhone SDK.

I'm actually doing a similar thing currently. Syncing isn't as trivial as you might first think. As far as doing this with Core Data goes, you want to perform the sync in a separate managed object context, save that context, and handle the save notification to merge it into your main context so that your application receives all the correct change events.

You need to handle when the server/client has a different system time as well. Even a difference of a few seconds can cause problems depending on how you are merging the changes.

Mike Weller