Sdk 2.3.2 to 3.2.5 stop ranging doesn't work


I was using SDK 2.3.2 and migrated to 3.2.5 using PODS Update. Then updated my Links to include EstimoteSDk.Framework.

After this update stop ranging call back method doesn’t stop the ranging.

Also have compile error in my code.
Incompatible pointer types sending ‘CLBeaconRegion *’ to parameter of type ‘ESTBeaconRegion *’ on following code.
[self.beaconManager stopRangingBeaconsInRegion:self.beaconRegion];

Any suggestions to resolve this ?

Thank you

Take a look at our 2.x :arrow_right: 3.x migration guide:

ESTBeaconRegion was replaced by CLBeaconRegion.

I followed, the problem is even after invoking stopranging becon the callback to didRangeBeacons method doesn’t stop. Here is code snippet.

// beacon initialize
self.beaconManager = [[ESTBeaconManager alloc] init];
self.beaconManager.delegate = self;
self.beaconRegion = [[CLBeaconRegion alloc] initWithProximityUUID:ESTIMOTE_PROXIMITY_UUID identifier:@"xxxx"];

[self.beaconManager requestWhenInUseAuthorization];
[self.beaconManager startRangingBeaconsInRegion:self.beaconRegion];

// beacon inrange call back
- (void)beaconManager:(id)manager didRangeBeacons:(NSArray *)beacons inRegion:(CLBeaconRegion *)region {
  if (beacons.count > 0) {
    CLBeacon *firstBeacon = [beacons objectAtIndex:0];
    NSString *URLString = [NSString stringWithFormat:@"http://xxxxx/BeaconService/name?beaconId=%@&major=%@&minor=%@", firstBeacon.proximityUUID.UUIDString, firstBeacon.major,firstBeacon.minor];
    NSURL *url = [NSURL URLWithString:URLString];
    NSData *data = [NSData dataWithContentsOfURL:url];
    NSError *error;
    if (error != nil) {
      NSLog(@"%@", [error localizedDescription]);
    } else {
      self.returnedDict = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:&error];
  [self.beaconManager stopRangingBeaconsInRegion:self.beaconRegion];        

Are you sure you’re not ranging for any other regions somewhere else?

Also, it sometimes happens that iOS keeps delivering a few remaining didRange callbacks even after you stop ranging given region, but it should literally be just a few of them. Does ranging continue even after a few seconds for you?

I don’t have any other region’s for sure. Regarding multiple call backs, when look into the beckon array in callback, it is the same set of beacons uuid that comes back.

I can’t quite reproduce this. Any chance you have more than one ESTBeaconManager or CLLocationManager in your code?