I have this code
[[self.client dataClient] getEntities:@"book" query:nil
completionHandler:^(ApigeeClientResponse *result) {
if (result.transactionState ==kApigeeClientResponseSuccess) {
_objects = result.response[@"entities"];
} else {
_objects = @[]; //"Incompatible pointer types assigning to NSMutableArray from NSArray"
}
[self.tableView reloadData];
}];
It shows me error "Incompatible pointer types assigning to NSMutableArray from NSArray"
You are trying to assing a
NSArray
(@[]
) to a variable of typeNSMutableArray
.Replace:
with:
Even you do not mention an error in the first if clause, you have to replace this also.