Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save CHLibrarian/3d527dbdc110900b694d to your computer and use it in GitHub Desktop.
Save CHLibrarian/3d527dbdc110900b694d to your computer and use it in GitHub Desktop.
ContextHub Element Services Geofence Retrieve ID Gist
// Getting a geofence with a specific ID
NSString *geofenceID = @"1000";
[[CCHGeofenceService sharedInstance] getGeofenceWithId:geofenceID completionHandler:^(NSDictionary *geofence, NSError *error)completionHandler {
if (!error) {
CLCircularRegion *geofenceRegion = [CCHGeofenceService regionForGeofence:geofence];
} else {
NSLog(@"Could not get geofence from ContextHub");
}
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment