Hello,
I’m trying to replace Parse with Backendless in my app but I’m kinda stucked right now. I need to retrieve all the data from Backendless to the device and it in an NSMutableArray. Here is the code that I used with Parse:
-(void) getDataForArray
{
PFQuery *query = [PFQuery queryWithClassName:kParseClassName];
NSArray *arr = [query findObjects];
puzzleArray = [[NSMutableArray alloc] init];
for (PFObject *dic in arr) {
NSMutableDictionary *tempDic = [[NSMutableDictionary alloc] init];
tempDic[@“answer”] = dic[@“answer”];
tempDic[@“option_one”] = dic[@“option_one”];
tempDic[@“option_three”] = dic[@“option_three”];
tempDic[@“option_two”] = dic[@“option_two”];
tempDic[@“question”] = dic[@“question”];
[puzzleArray addObject:tempDic];
}
[[NSUserDefaults standardUserDefaults] setValue:puzzleArray forKey:@“PuzzelArray”];
[[NSUserDefaults standardUserDefaults] synchronize];
self.waitingView.view.hidden = true;
}
Thanks in advance!
Best Regards,
Kristof Kovacs