Skip to content

Commit

Permalink
Improvements and fixes to updating monitored regions
Browse files Browse the repository at this point in the history
  • Loading branch information
svenroed committed Aug 13, 2016
1 parent 9bcf4e9 commit c4f02ff
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 17 deletions.
Expand Up @@ -90,6 +90,14 @@ typedef void(^KATUpdateConfigHandler)(NSArray *regions, NSError *error);
@property (nonatomic) BOOL monitorVisits;


/**
* Determines whether the SDK needs to share available regions with other parts of the app
*
* @since v1.8.5
*/
@property (nonatomic) BOOL shareRegions;


/**
* Get the local config
*
Expand Down
Binary file modified KatalysatorSDK.framework/Versions/A/KatalysatorSDK
Binary file not shown.
23 changes: 6 additions & 17 deletions Sample/ViewController.m
Expand Up @@ -17,33 +17,22 @@ - (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];

// DATA COLLECTION
// START COLLECTING
KATConfiguration *config = [[KATConfiguration alloc] init];
config.apiToken = [[NSUUID alloc] initWithUUIDString:@"B3945743-D258-49D0-AFBF-1E409AE59501"];
config.suppressBluetoothAccuracyAlert = YES;

KATBeaconManager *beaconManager = [[KATBeaconManager alloc] initWithConfiguration:config];
[beaconManager startCollecting];

[beaconManager triggerWithHandler:^(NSDictionary *requestDict)
{
NSLog(@"TRIGGER %@", requestDict);
}];

[beaconManager debugWithHandler:^(id result)
{
NSLog(@"DEBUG %@", result);
}];
[beaconManager debugWithHandler:^(id result) {
NSLog(@"DEBUG %@", result);
}];

// AUDIENCE RECEIVING
// RECEIVE TAGS
KATAudienceManager *audienceManager = [[KATAudienceManager alloc] initWithApiToken:config.apiToken];
[audienceManager audiencesAndGeotagsWithCompletion:^(NSDictionary *audiences, NSError *error)
{
// raw response
[audienceManager audiencesAndGeotagsWithCompletion:^(NSDictionary *audiences, NSError *error) {
NSLog(@"AUDIENCES %@", audiences);

// helper method to create a url query string from the mapping
NSLog(@"AUDIENCES QUERY %@", [KATAudienceManager toQueryString:audiences[@"mapping"]]);
}];
}

Expand Down

0 comments on commit c4f02ff

Please sign in to comment.