Start a new topic

[KCSUserDiscovery lookupUsersForFieldsAndValues:completionBlock] call completionBlock twice when no

When lookup return zero object and no error , completionBlock is called twice with the same result.

What library version? Can you post an example?
1.22, I can't upgrade because of query crashing problem I've posted earlier. Code Sample:

[KCSUserDiscovery lookupUsersForFieldsAndValues:@{KCSUserAttributeUsername: userName}

completionBlock:^(NSArray *objectsOrNil, NSError *errorOrNil) {

if (errorOrNil == nil) {

NSLog(@"Found %d %@", objectsOrNil.count, userName);

if (objectsOrNil.count > 0) {

NSLog(@"This is called once");

} else {

NSLog(@"This is called twice");


} else {

NSLog(@"Some error");



I am looking into this.
Thanks, I found the bug. It'll be fixed in the next release.
Login or Signup to post a comment