Quickblox: cannot get request parameters (or userid) for QBCOCustomObjectPagedResult with zero objects

StackOverflow https://stackoverflow.com/questions/20991742

  •  25-09-2022
  •  | 
  •  

Question

Is there a way to find for which user OR which request parameters were used to fetch custom objects in case returning zero objects as a result in my completedWithResult callback?

Background: I am fetching several custom objects at the same time (for different users) and actually for different custom classes as well. In case some user do not have any custom objects for this specific class, which is the correct/best way to confirm which user this request was made for.

In practice, is there a way to get request parameters out somehow from QBCOCustomObjectPagedResult paged object?

If I get object, it is easy to check this using QBCOCustomObject.userID. But for paged result this is not available and when trying to check

QBCOCustomObjectPagedResult.request.parameters seems to be (null) each time.

For the request, I use following:

NSMutableDictionary *getRequest = [NSMutableDictionary dictionary];
[getRequest setObject:[NSNumber numberWithInt:QBID] forKey:@"user_id"];
[QBCustomObjects objectsWithClassName:@"CLASSNAME" extendedRequest:getRequest delegate:self context:MYCONTEXT];

Using: Quickblox library for iOS (latest git commit: Wed Nov 27 18:52:20 2013 +0200)

Was it helpful?

Solution

For this you should use MYCONTEXT parameter and pass to it your getRequest.
SDK hide request data from programmer. (QBCOCustomObjectPagedResult.request = nil) You receive only server response. May be later this will be fixed.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top