Last active
August 29, 2015 14:04
-
-
Save CHLibrarian/702e5903bc757eeeaca5 to your computer and use it in GitHub Desktop.
ContextHub Element Services Subscription Add Gist
This file contains 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
// 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