Skip to content

Instantly share code, notes, and snippets.

@CHLibrarian
Last active August 29, 2015 14:05
Show Gist options
  • Select an option

  • Save CHLibrarian/191d805bf82b563cabf0 to your computer and use it in GitHub Desktop.

Select an option

Save CHLibrarian/191d805bf82b563cabf0 to your computer and use it in GitHub Desktop.
ContextHub Element Services Beacon Delete Gist
// Deleting a beacon takes the same NSDictionary structure as updating one
[[CCHBeaconService sharedInstance] deleteBeacon:beaconDict completionHandler:^(NSError *error) {
if (!error) {
NSLog(@"Deleted beacon in ContextHub");
// If you do not have push properly set up, you need to explicitly call synchronize on CCHSensorPipeline so it will stop generate events if it applies to this device
[[CCHSensorPipeline sharedInstance] synchronize:^(NSError *error) {
if (!error) {
NSLog(@"Successfully synchronized with ContextHub");
} else {
NSLog(@"Could not synchronize with ContextHub");
}
}];
} else {
NSLog(@"Could not delete beacon in ContextHub");
}
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment