nothirst / TICoreDataSync

Automatic synchronization for Core Data apps, between any combination of Mac OS X and iOS: Mac to iPhone to iPad to iPod touch and back again.
https://github.com/nothirst/TICoreDataSync/wiki
807 stars 61 forks source link

iOS Tutorial on Polling Start #60

Open mazzuna opened 11 years ago

mazzuna commented 11 years ago

In the iOS Tutorial it says:


Enable Automatic Synchronization After Changes are Detected:

You’ll need to turn on remote change polling immediately after the document sync manager has finished registering, so add the following into the relevant delegate method:


If the whole stores need to be downloaded this causes the sync changes to be downloaded and "applied" before the whole store is downloaded - causing some of those changes not be applied. I was mainly seeing the problem for deletions. It could also be due to how I have application structured. My own documentSyncManagerDidFinishRegistering: method is as follows:

(this is after I changed it so that it works correctly for me)

}

If a download of the whole stores is necessary I put [self.documentSyncManager beginPollingRemoteStorageForChanges] in documentSyncManagerDidFinishDownloadingWholeStore:.

Thanks! Mazen

MrRooni commented 11 years ago

That's a good catch Mazen, thanks.