I have a Rest api hosted over my .com domain which on receiving request like this www.mydomain.com/api/lists will return the json formatted data as shown below
[
You can't do this:
listID = [argsDict objectForKey:@"list_id"];
NSLog(@"The listID is %@",listID);
because there is no list_id parameter in the path pattern /api/lists. So, if this data is missing, your predicate will always be checking for the wrong listID.
But, you don't need any of that. Assuming that the request returns all of the objects from the server - the only time you should be using fetch blocks - then you don't need a predicate. Just create a fetch request for the entity and return it without any predicate.