Question for Simperium:
A badly-written XC unit test wiped most data from a simperium user account (mine.) No problem. I moved a day-old back-up of the sqlite file into an iPhone 5 (iOS 9.1) simulator, and deleted the now-useless sqlite file from the same Documents directory.
I performed a clean (SHIFT-COMMAND-K), and started the simulator. All my missing data now appeared in the app simulator. Great.
BUT restored Core Data records did not then get synced to corresponding Simperium buckets. Puzzling as Simperium DID respond successfully to syncing new records on create, update, and delete actions.
I then deleted the entire data set on Simperium.com. Same result. New records syncing no problem, old records no.
Is there important meta-data that I deleted when deleting the old sqlite file. If so, (how) can I get old records to re-sync?
What's going on is: the method that should pick up those 'new old entities' is getting bypassed, because all of them already have both, a Key + GhostData.
This scenario should normally recover automatically, granted that those entities get updated somehow (that way the lib would pick them up and sync them with the backend).
The easiest way to force a re-upload would be:
In your app, add a (temporary + helper method) that gets executed right after Simperium is initialized (and thus, the Core Data stack is wired), but before the authenticate
method is called.
Loop through all of the entities in that bucket and set to nil both, the simperiumKey and ghostData value.
Run your app just once
Kill this helper method (otherwise it'd probably cause duplicate entries!).
(Untested), but that should do the trick!