I was posted this question earlier. But i didn't get what i want. Now Im trying to use Parse and instead of saving it locally using Realm, I will be using CoreData or Sqlite. But my problem is in BFTask. I read their documentation in regards with saving the data locally using sqlite.
PFQuery *query = [PFQuery queryWithClassName:@"GameScore"];
[query fromLocalDatastore];
[[query getObjectInBackgroundWithId:@"xWMyZ4YEGZ"] continueWithBlock:^id(BFTask *task) {
if (task.error) {
// something went wrong;
return task;
}
// task.result will be your game score
return task;
}];
But I'm having an error on the BFTask Part. It says Recevier type 'BFTask' for instance message is forward declaration
How can i fix this? I was also searching through the internet regarding this. I already added the CoreData.framework to my project (of course) and also the #import <CoreData/CoreData.h> to my .pch file. and also in my .h and .m file but i still got the error. Please help me!
Thanks! More power!
Aucun commentaire:
Enregistrer un commentaire