Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save CHLibrarian/8a124104fe165ca06deb to your computer and use it in GitHub Desktop.
Save CHLibrarian/8a124104fe165ca06deb to your computer and use it in GitHub Desktop.
ContextHub Element Services Beacon Retrieve Tags Gist
// Getting all beacons with the tag "beacon-tag"
NSString *beaconTag = @"beacon-tag";
[[CCHBeaconService sharedInstance] getBeaconsWithTags:@[beaconTag] completionHandler:^(NSArray *beacons, NSError *error) {
if (!error) {
for (NSDictionary *beaconDict in beacons) {
CLBeaconRegion *beaconRegion = [CCHBeaconService regionForBeacon:beaconDict];
}
} else {
NSLog(@"Could not get beacons from ContextHub");
}
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment