0

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.

Matti Vilola
  • 185
  • 7

1 Answers1

1

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

frankWhite
  • 1,523
  • 15
  • 21
  • Wonderful! I am able to increment values of a custom objet nicely now based on your tip/hint. Many thanks @frankWhite! – Matti Vilola Jan 23 '14 at 22:13