Skip to content

Instantly share code, notes, and snippets.

@emilepetrone
Created October 11, 2011 17:30
Show Gist options
  • Save emilepetrone/1278762 to your computer and use it in GitHub Desktop.
Save emilepetrone/1278762 to your computer and use it in GitHub Desktop.
// add or update a record
SGStoredRecord *record = [SGStoredRecord recordWithID:@"recordID"
point:[SGPoint pointWithLat:37.772445 lon:-122.405913]
layer:@"com.simplegeo.example"];
[record setCreated:date]; // optional
[record setProperties:propertiesDictionary]; // optional
[client addOrUpdateRecord:record
callback:[SGCallback callbackWithSuccessBlock:
^(id response) {
// addition/update confirmed
} failureBlock:^(NSError *error) {
// addition/update failed
}]];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment