Question

Is it possible to access special parameters defined in http://quickblox.com/developers/Custom_Objects#Special_update_operators via Quickblox iOS SDK?

E.g. updating a custom object record by incrementing (or decrementing) specific numerical field?

What I would like to do in my application to increment couple of fields by +1.

Was it helpful?

Solution

I have test CO with integer field "value". At first I set value to 20.

NSMutableDictionary *updateRequest = [NSMutableDictionary new];
[dictionary setObject:@(1500) forKey:@"inc[value]"];

[QBCustomObjects updateObject:obj specialUpdateOperators:updateOperators delegate:self];

Now I have object with value = 1520.

Be careful with permissions. If you don't right setup it, you'll get "Wrong permission" error

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