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
[[CCHVault sharedInstance] getItemWithTags:@[@"demo"] completionHandler:^(NSArray *responses, NSError *error) { | |
if (error) { | |
//handle errors | |
} else { | |
//work with the responses | |
} | |
}]; |
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
[[CCHVault sharedInstance] getItemWithId:@"ITEM-ID" completionHandler:^(NSDictionary *response, NSError *error) { | |
if (error) { | |
//handle errors | |
} else { | |
//work with your data | |
} | |
}]; |
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
[[CCHVault sharedInstance] createItem:item tags:@"demo" completionHandler:^(NSDictionary *response, NSError *error) { | |
//Returns NSDictionary with info in data key | |
}]; |
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
[[CCHPush sharedInstance] sendNotificationToAliases: userInfo: completionHandler:^(NSError *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
[[CCHPush sharedInstance] sendNotificationToDevices: userInfo: completionHandler^(NSError *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
[[UIApplication sharedApplication] registerForRemoteNotificationTypes: (UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)]; |
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
var deviceName = event.context[2].device_context.name | |
var event = deviceName + " triggered a geofence_in event" | |
Console.log(event) | |
var eventData = {"deviceName":deviceName, "event":"geofence_in"} | |
Vault.create(eventData, "geofence-tag") |
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
"device_context" = { | |
"device_id" = "BEE8D95B-01FF-4835-8A71-F1D89A39771C"; | |
model = "iPhone Simulator"; | |
name = "iPhone Simulator"; | |
"system_name" = "iPhone OS"; | |
"system_version" = "7.1"; | |
type = iPhone; | |
}; |
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
data = { | |
"current_activity" = { | |
activities = ( | |
stationary | |
); | |
confidence = 2; | |
"start_date" = "2014-03-26 21:32:51 +0000"; | |
}; | |
"previous_activity" = { | |
activities = ( |