2
votes

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
i get same warning message if i enable local data store in appdelegate.m file. did you find any solution? - alioguzhan
Not a solution, but a workaround: When the app is deleted from the simulator or device, the local datastore is also deleted, and one can start from scratch again (see my own answer below). - Reinhard Männer

1 Answers

1
votes

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