This file contains hidden or 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
| event = { | |
| context = (), | |
| data = {}, | |
| name = "location_changed", | |
| payload = {} | |
| } |
This file contains hidden or 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
| NSData *imageData = UIImageJPEGRepresentation(profilePicture,.99); | |
| NSString *fileName = @"ProfilePicture.png"; | |
| CCHVaultResource *profilePictureResource = [[CCHVaultResource alloc]initWithName:@"profile_picture_url" | |
| fileName:fileName | |
| mimeType:@"image/png" | |
| data:imageData]; | |
| NSString *container = @"profiles"; |
This file contains hidden or 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
| [[CCHVaultService sharedService] deleteItem:item completion:^(NSDictionary *carbonResponse, NSError *error) { | |
| if (!error) { | |
| NSLog(@"Item Deleted %@", item); | |
| } else { | |
| NSLog(@"Error deleting item %@", item); | |
| } | |
| }]; |
This file contains hidden or 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
| NSMutableDictionary *item = [NSMutableDictionary dictionaryWithDictionary:self.item]; | |
| [item setObject:self.nameTextField.text forKey:@"name"]; | |
| [[CCHVaultService sharedService] updateItem:item completion:^(NSDictionary *carbonResponse, NSError *error) { | |
| if (error) { | |
| NSLog(@"Error %@",error); | |
| } else { | |
| NSLog(@"Success %@", carbonResponse); | |
| } | |
| }]; |
This file contains hidden or 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
| [[CCHVaultService sharedService] getItemsInContainer:@"paintings" completion:^(NSArray *carbonResponses, NSError *error) { | |
| if (error) { | |
| NSLog(@"Error %@", error); | |
| } else { | |
| NSLog(@"Success %@", carbonResponse); | |
| } | |
| }]; |
This file contains hidden or 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
| NSString *containerName = @"paintings"; | |
| NSDictionary *item = @{@"name":self.nameTextField.text}; | |
| [[CCHVaultService sharedService] createItem:item inContainer:containerName completion:^(NSDictionary *carbonResponse, NSError *error) { | |
| if (error) { | |
| NSLog(@"Error %@", error); | |
| } else { | |
| NSLog(@"Success %@", carbonResponse); | |
| } | |
| }]; |
This file contains hidden or 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
| NSDictionary *userInfo = @{@"content-available":@"1", @"sound":@"", @"custom":self.customData.text, @"alert":@""}; | |
| [[CCHNotificationService sharedService] sendAPNSNotificationToAliases:@[[ContextHub deviceId]] userInfo:userInfo withCompletion:^(NSError *error) { | |
| NSLog(@"Error %@", error); | |
| }]; |
This file contains hidden or 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
| NSDictionary *userInfo = @{@"sound":@"techno.aif", @"custom":self.customData.text, @"alert":@"CAN YOU HEAR ME NOW?", @"badge":@"1000"}; | |
| [[CCHNotificationService sharedService] sendAPNSNotificationToAliases:@[[ContextHub deviceId]] userInfo:userInfo withCompletion:^(NSError *error) { | |
| NSLog(@"Error %@", error); | |
| }]; |
This file contains hidden or 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
| NSDictionary *userInfo = @{@"custom":self.customData.text, @"alert":@"Data was pushed!"}; | |
| [[CCHNotificationService sharedService] sendAPNSNotificationToAliases:@[[ContextHub deviceId]] userInfo:userInfo withCompletion:^(NSError *error) { | |
| NSLog(@"Error %@", error); | |
| }]; |