Last active
December 18, 2015 15:49
-
-
Save mdobson/5807345 to your computer and use it in GitHub Desktop.
create book in obj-c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UGClientResponse *response = [self.client createEntity:book]; | |
//Lets check if our response was accepted by the server, and add the created object to a collection called _objects | |
if (response.transactionState == kUGClientResponseSuccess) { | |
[_objects insertObject:response.response[@"entities"][0] atIndex:0]; | |
} |
Matt
I am getting entity missing a type field error from this section while trying to add new book entry
// the entity must have a "type" field
_type = [newEntity valueForKey:@"type"];
if ( !_type )
{
error = @"entity is missing a type field";
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here is how we create a book in objective c using UserGrid.