I'm dealing with the scenario, where a user has previously deleted the app and has now re-installed it.
It was hitting my delta fetch function, which is receiving a lot of old subscription notifications, mostly deletes. But not downloading current records.
I'm now adding code to perform a fetch on each record type to download all the data.
I'd like to reset delta fetch server token, so the app doesn't have to process old subscriptions notifications. However I can't find how to do this, maybe it's not possible.
Are you referring to
CKServerChangeToken(documentation) when you say "delta fetch server token"? And are you attempting to sync within the CloudKit private database?Assuming that is true, here is an example of how I fetch changes from the private database and keep track of the sync token:
Your specific situation might differ a little, but I think this is how it's generally supposed to work when it comes to staying in sync with CloudKit.
Update
You could try storing the
previousServerChangeTokenon theUsersrecord in CloudKit (you would have to add it as a new field). Each time thepreviousServerChangeTokenchanges inrecordZoneFetchCompletionBlockyou would have to save it back to iCloud on the user's record.