Search code examples
quickblox

Quickblox: analog of "push" method in the RESTful API


In the Quickblox RESTful API there's a special update operator "push" that appends specified values to array.
Is there any analog in the Quickblox iOS SDK that doesn't require to send the whole array to the server to update one value?


Solution

  • Hope this help

    QBCOCustomObject *object = [QBCOCustomObject customObject];
    object.className = @"SuperSample";
    object.ID = @"51d5a979efa357c7fa000006";
    
    NSMutableDictionary *specialUpdateParams = [NSMutableDictionary dictionary];
    [specialUpdateParams setObject:@"phone" forKey:@"push[interests]"];
    
    [QBCustomObjects updateObject:object specialUpdateOperators:specialUpdateParams delegate:self];
    

    Feel free to try Snippets https://github.com/QuickBlox/quickblox-ios-sdk/tree/master/snippets

    This project contains lots of examples