Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save CHLibrarian/2c87c4bc87df047d221d to your computer and use it in GitHub Desktop.
Save CHLibrarian/2c87c4bc87df047d221d to your computer and use it in GitHub Desktop.
Application Services Device Setting (iOS)
NSString *updatedAlias = @"[email protected]";
NSString *updatedTag1 = @"Austin";
NSString *updatedTag2 = @"Field Rep";
// Update device with new alias and tags
[[CCHDevice sharedInstance] setAlias:updatedAlias tags:@[updatedTag1, updatedTag2] completionHandler:^(NSDictionary *device, NSError *error)completionHandler {
if (!error) {
NSLog(@"Device alias/tag updated");
} else {
NSLog(@"Failed to set new alias/tag for device in ContextHub");
}
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment