Skip to content

Instantly share code, notes, and snippets.

@CHLibrarian
Last active August 29, 2015 14:04
Show Gist options
  • Save CHLibrarian/702e5903bc757eeeaca5 to your computer and use it in GitHub Desktop.
Save CHLibrarian/702e5903bc757eeeaca5 to your computer and use it in GitHub Desktop.
ContextHub Element Services Subscription Add Gist
// Subscribing to a tag
// We want to subscribe to tag "beacon-tag" to be notified when a beacon with that tag is created, updated, or deleted
NSString *tag = @"beacon-tag";
[[CCHSubscriptionService sharedInstance] addSubscriptionForTags:@[tag] options:@[CCHOptionBeacon] completionHandler:^(NSError *error) {
if (!error) {
NSLog(@"Subscribed to tag %@ in ContextHub, tag");
} else {
NSLog(@"Could not subscribe to tag %@ ContextHub", tag);
}
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment