Estimote Monitoring allows apps to detect when somebody is entering and exiting the range of beacons. Compared to iOS Core Location Monitoring, it allows for more granular enters/exits without any region limit. The algorithms rely on a couple of beacon settings being properly configured. To do this:
- Download the latest version of iOS SDK.
- Discover your device (its Connectivity Packet) with ESTDeviceManager:
ESTDeviceManager *deviceManager = [[ESTDeviceManager alloc] init];
deviceManager.delegate = self;
[deviceManager startDeviceDiscoveryWithFilter:[[ESTDeviceFilterLocationBeacon alloc] init]]; - Connect with it:
- (void)deviceManager:(ESTDeviceManager *)manager didDiscoverDevices:(NSArray *)devices {
ESTDeviceLocationBeacon *locationBeacon = (ESTDeviceLocationBeacon *)devices.firstObject;
locationBeacon.delegate = self;
[locationBeacon connect];
} - Turn on settings required by Estimote Monitoring by using ESTEstimoteMonitoringFeatureset:
- (void)estDeviceConnectionDidSucceed:(ESTDeviceConnectable *)device {
ESTDeviceLocationBeacon *locationBeacon = (ESTDeviceLocationBeacon *)device;
ESTFeaturesetEstimoteMonitoring *featureset = [[ESTFeaturesetEstimoteMonitoring alloc] initWithDevice:locationBeacon];
[featureset writeEnableSettings:YES withCompletion:^(NSArray *errors) {
if (errors) {
NSLog(@"Failed to enable monitoring. Errors: %@", errors);
} else {
NSLog(@"Estimote Monitoring enabled!");
}
}];
}