Start a new topic

Custom endpoint giving null values frequently

Last two days my app when make queries is returning null values frequently.

Our in house app testing team is not satisfied with this.

Can you please help me solve this issue.

I solved this issue.

This is how i did it. May be its little tricky. This will loop till it fetch the datas from the db.



[self showActivityIndicator];

_dict = [[NSDictionary alloc] initWithObjectsAndKeys:_username,@"userName", nil];

NSString* string = @"userSelfiesPopular";



[KCSCustomEndpoints callEndpoint:string params:_dict completionBlock:^(id results, NSError *error) {



if (results) {



//load is successful!

_objects = [NSArray arrayWithArray:results];

[self loadImages];

[self stopActivityIndicator];



} else {



//load failed

[self loadBugFix];



}

}];



- (void)loadBugFix {

[KCSCustomEndpoints callEndpoint:string params:_dict completionBlock:^(id results, NSError *error) {



if (results) {



//load is successful!

_objects = [NSArray arrayWithArray:results];

[self loadImages];

[self stopActivityIndicator];



} else {



//load failed

[self loadBugFix];



}

}];

}

I'm running into the same issue, and also had to resort to implementing a loop until the data is returned. Long term, this is not acceptable, and I hope a fix is found.
Login or Signup to post a comment