Estimote / iOS-Fleet-Management-SDK

Estimote Fleet Management SDK for iOS
https://developer.estimote.com
MIT License
1.18k stars 398 forks source link

didDetermineState doesn't work with Secure UUID beacons #163

Closed benjaminhallock closed 9 years ago

benjaminhallock commented 9 years ago

So I've tried to set this up, nothing is working.

  1. Put appID and token in AppDelegate.
  2. Enabled "Secured" in init method for Beacon Region.
  3. Secure my Estimote, then start ranging.

What works is when you manual startRanging, then I get my secure Estimote.

What doesn't is when I notifyOnEntry or Display. didDeterminateState doesn't get called as usual. Secure UUID is what is stopping this.

martinklimek commented 9 years ago

Hi @benjaminhallock ,

Can you paste code when you start monitoring for secured beacons?

benjaminhallock commented 9 years ago
//This is called in the the viewDidLoad method.
-(void)setUpBeaconManagerAndRegions {
        self.beaconManager = [[ESTBeaconManager alloc] init];
        self.beaconManager.delegate = self;
        self.beaconRegion = [[ESTBeaconRegion alloc]initWithProximityUUID:ESTIMOTE_PROXIMITY_UUID identifier:@"Estimote" secured:YES];
        self.beaconRegion.notifyOnExit = YES;
        if ([_userDefaults boolForKey:sendNotifications]) {
            self.beaconRegion.notifyOnEntry = YES;
            self.beaconRegion.notifyEntryStateOnDisplay = NO;
        } else {
            self.beaconRegion.notifyOnEntry = NO;
            self.beaconRegion.notifyEntryStateOnDisplay = YES;
        }
        [self.beaconManager startMonitoringForRegion:self.beaconRegion];
}
martinklimek commented 9 years ago

Thanks for code @benjaminhallock, it looks fine at first glance. Can you tell me what device and iOS version you are using?

benjaminhallock commented 9 years ago

The biggest iPhone on the latest iOS.

benjaminhallock commented 9 years ago

This issue seems to be happening no matter what I do on 2.2.1.

Rolling back fixes the issue. I turn on display, didDetermineState is called.

heypiotr commented 9 years ago

We're aware of a bug in the didDetermineState method that prevents it from working correctly with Secure UUID beacons. That's the root cause of the issue here. Stay tuned for the fix.

heypiotr commented 9 years ago

Fixed in 3.0.