I have a Parse app and I want to enable local data store for caching/offline use. In my app delegate, I've set [Parse enableLocalDatastore];
.
In my query (to the server), I'm making a normal query, but I'm pinning the results upon fetch:
[followingsQuery findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {
[PFObject pinAllInBackground:objects block:^(BOOL succeeded, NSError *error) {
NSLog(@"er: %@", error);
}];
... //rest of my handler
}];
However, the completion block (NSLog(@"er: %@", error);
) is never called. Not even with an error. I've got breakpoints everywhere. pinAllInBackground:block:
is called, but it's completion handler is never called (my app's been running for 2 minutes straight, it's pinning only 100 objects, so it should be instantaneous). I've also tried pinAllInBackground:withName:block:
but no difference. I've tried pinAll:
and it just never returns, blocking the calling thread (it doesn't consume any CPU though). How can I solve this problem?