Skip to content

Instantly share code, notes, and snippets.

View Kevinwlee's full-sized avatar

Kevin Lee Kevinwlee

View GitHub Profile
@Kevinwlee
Kevinwlee / create-beacon.mm
Last active August 29, 2015 14:03
How to create a beacon
[[CCHBeaconService sharedInstance] createBeaconWithProximityUUID:uuid major:major minor:minor name:@"Beacon" tags:@"demo" completionHandler:^(NSDictionary *beacon, NSError *error) {
// beacon dictionary has info about beacon created
}];
Hi
{
"created_at": "2014-03-26T21:20:24+00:00",
"id": "ca911d07-55c2-4360-afb0-2f246917418a",
"name": "geofence_in",
"data": {
"altitude": "0",
"course": "-1",
"datetime": "2014-03-26 21:20:24 +0000",
"device_id": "BEE8D95B-01FF-4835-8A71-F1D89A39771C",
"fence": {
function (event, push, vault) {
// text box starts here!
}
data = {
"current_activity" = {
activities = (
stationary
);
confidence = 2;
"start_date" = "2014-03-26 21:32:51 +0000";
};
"previous_activity" = {
activities = (
data = {
altitude = "18.16732978820801";
beacon = {
major = 32872;
minor = 7821;
proximity = "immediate_state";
rssi = "-40";
uuid = "E2C56DB5-DFFB-48D2-B060-8876223462A3";
};
course = "-1";
data = {
altitude = "21.54464340209961";
beacon = {
major = "";
minor = "";
name = JP;
uuid = "E2C56DB5-DFFB-48D2-B060-8876223462A3";
};
course = "-1";
datetime = "2014-03-26 20:38:20 +0000";
data = {
altitude = 0;
course = "-1";
datetime = "2014-03-26 21:20:24 +0000";
"device_id" = "BEE8D95B-01FF-4835-8A71-F1D89A39771C";
fence = {
id = sandcreek;
latitude = "30.054381";
longitude = "-95.17071199999999";
radius = 100;
data = {
altitude = 0;
course = 0;
datetime = "2014-03-26 20:07:41 +0000";
"device_id" = "BEE8D95B-01FF-4835-8A71-F1D89A39771C";
latitude = 0;
longitude = 0;
speed = 0;
};
{
event = {
context = (
{
"location_context" = {
"location_context" = {
altitude = 0;
course = 0;
datetime = "2014-03-26 20:07:41 +0000";
"device_id" = "BEE8D95B-01FF-4835-8A71-F1D89A39771C";