Parse: How to reset the local datastore?

674 views Asked by At

For testing purposes I used the Parse local datastore with synchronous methods and got, as expected, the Warning: A long-running operation is being executed on the main thread.
My app had also several bugs that let it crash. I fixed the bugs and replaced the synchronous methods by asynchronous methods.

However the app now has unexpected errors:

When [Parse enableLocalDatastore]; is executed, I get again the Warning: A long-running operation is being executed on the main thread, although no synchronous method has been called yet.

When I then execute

PFQuery *query = [PFUser query];
NSArray *allUsers = [query findObjects];

I get the error -[__NSCFDictionary fetchFromLocalDatastoreInBackground]: unrecognized selector sent to instance xxxxxxx.

Apparently, these errors are related to earlier crashes of the app, and the local datastore might be in an inconsistent state.

My question is: Is it possible to reset the local datastore to avoid errors related to earlier runs?

1

There are 1 answers

0
Reinhard Männer On

Sorry for my silly question: One simply has to delete the app from the simulator or the device. This deleted the local datastore.