Hello everyone!
I try to connect to a estimote nearble sticker and get this error:
Error Domain=com.estimote Code=2 “Authorization failed for this beacon.”
Here are steps I’ve implemented, please let me know what do I miss?
-(void)setupEstimote{
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
[ESTCloudManager setupAppID:@"my_app_id" andAppToken:@"my_app_key"];
});
NSLog(@"%d", [ESTCloudManager isAuthorized]);
}
- (IBAction)onDone:(UIBarButtonItem *)sender {
NSIndexPath *ip=[[self.collectionView indexPathsForSelectedItems] firstObject];
ESTNearable *device=[self.dataSource itemAtIndexPath:ip];
CLBeaconRegion *region = [device beaconRegion];
self.connection = [ESTBeaconConnection connectionWithProximityUUID:region.proximityUUID major:region.major.intValue minor:region.minor.intValue delegate:self];
[self.connection startConnection];
}
-(void)beaconConnectionDidSucceed:(ESTBeaconConnection *)connection{
NSLog(@"%@", connection);
}
- (void)beaconConnection:(ESTBeaconConnection *)connection didFailWithError:(NSError *)error{
NSLog(@"%@", error);
}