not found the object to fetch 刚刚测试机就不行啦。是怎么回事一值报那个错误。我就用个批量请求的方法。请求了三次就不行了
,,急急 AVQuery *query = [AVQuery queryWithClassName:@"Subject_Name"];
[query includeKey:@"Hottest_table"];
[query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {
NSLog(@"===1error---%@",[error localizedDescription]);
NSMutableArray * array = [[NSMutableArray alloc]init];
NSLog(@"===1error---%@",objects);
[objects enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
AVObject * AVobj = (AVObject *)obj;
NSArray * subjectContentArray = [AVobj objectForKey:@"subject_Content"];
[AVObject fetchAllInBackground:subjectContentArray block:^(NSArray * _Nullable objects, NSError * _Nullable error) {
NSLog(@"===2error---%@",[error localizedDescription]);
NSMutableArray * tempArray = [[NSMutableArray alloc]init];
[objects enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
AVObject * AVobj = (AVObject *)obj;
BabyModel * model = [[BabyModel alloc]init];
model.subjectName = [AVobj objectForKey:@"name"];
model.objID = [AVobj objectForKey:@"objectId"];
AVFile * thumFile = [AVobj objectForKey:@"ImageName"];
model.thumbnailURL = thumFile.url;
model.imageID = thumFile.objectId;
model.imageContent_Array = [AVobj objectForKey:@"facebao"];
model.imageClassName = [AVobj objectForKey:@"className"];
[tempArray addObject:model];
}];
[array addObject:tempArray];
succee(array);
[array removeAllObjects];
}];
}];
}];
-
创建时间
17年3月2日
-
最后回复
19年5月31日
-
7
回复
-
1.7K
浏览
-
3
用户
-
2
链接