Last active
August 29, 2015 14:05
-
-
Save CHLibrarian/191d805bf82b563cabf0 to your computer and use it in GitHub Desktop.
ContextHub Element Services Beacon Delete Gist
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
| // 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