In Parse docs, it clearly states that [Parse enableLocalDatastore];
should be called before [Parse setApplicationId:clientKey:];
: https://parse.com/docs/ios_guide#localdatastore-find/iOS
However, in my case, it immediately throws an exception:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'You have to call setApplicationId:clientKey: on Parse to configure Parse.'
If I move the code to execute after [Parse setApplicationId:clientKey:];
I don' get an error, but local store doesn't seem to work.
Seems that Parse's own docs are misleading. Anyone got a solution?
I put the [Parse enableLocalDatastore];
after the [Parse setApplicationId:clientKey:];
and i got another errors. But this another errors was because you can't use Local Datastore and Cache Policy together. When i removed the Cache Policy's methods everything works fine. So, i don't know if this is a documentation mistake, but you have to put this code after.
This should be fixed in the new v1.6.1 version of the Parse SDK.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With