I'm using parse 1.7.4 , this is y code :
+(NSArray *)getCategorieFromParse{
PFQuery *categoriesQuery = [PFQuery queryWithClassName:@"Categorie"];
[categoriesQuery findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error){
if (!error)
return objects;
else
return [[NSArray alloc] init];
}];
}
but this is generate this error :
Incompatible block pointer types sending 'NSArray *(^)(NSArray *__strong, NSError *__strong)' to parameter of type 'PFArrayResultBlock __nullable' (aka 'void (^)(NSArray * __nullable __strong, NSError * __nullable __strong)')
At the return line