didExitRegion not working as expected with two regions

Hello,
sorry for bothering you again but I haven’t found anything about my specific problem.
I am monitoring two regions using UUID-major-minor. When I enter in the regions didEnterRegion fires as expected, but when I go away from them didExitRegion is fired only once.
Moreover, if the two beacons are very close from each other, didEnterRegion too fires only once.

Can someone explain me why?

The beacon are 2 m distant.
[Edited]
I have added some log and noticed:
Entered the first region
2016-08-05 10:11:30.162 [270:9030] Entered region B9407F30-F5F8-466E-AFF9-25556B57FE6D:7:72
2016-08-05 10:11:30.186 [270:9030] Determine state 1 major and minor 7:72
2016-08-05 10:11:33.419 [270:9030] Determine state 1 major and minor 7:72
2016-08-05 10:11:38.387 [270:9030] Determine state 2 major and minor 7:730

And as soon I enter the second region the device change the state of the first region from inside in outside, even though this is not true and no exitRegion event is fired

2016-08-05 10:12:13.468 [270:9030] Entered region B9407F30-F5F8-466E-AFF9-25556B57FE6D:7:730
2016-08-05 10:12:13.491 [270:9030] Determine state 1 major and minor 7:730
2016-08-05 10:12:13.927 [270:9030] Determine state 1 major and minor 7:730
2016-08-05 10:12:22.167 [270:9030] Determine state 2 major and minor 7:72

Weird! Could be a bug in iOS iBeacon API. What iOS device and version are you on?

Hi,
I’m testing it with IPhone 6 - IOS version 9.3.4, updated today, but I have experienced this problem with IOS 9.3.3 too.
I have an IPad air and an IPhone 5 too, I can make test with them too if it can help

Some other details:
Before starting the monitoring I call stopMonitoringForAllRegions to avoid previous monitoring…
I have successfully tested the expected behaviour only once… so this doesn’t seem to work always in same the way.
Here a complete log of the strange behaviour

2016-08-05 11:20:42.131 [290:19779] Entered region B9407F30-F5F8-466E-AFF9-25556B57FE6D:7:72 <–enterRegion 7:72
2016-08-05 11:20:42.291[290:19779] Determine state 1 major and minor 7:72
2016-08-05 11:20:42.408[290:19779] Determine state 1 major and minor 7:72
2016-08-05 11:20:50.359[290:19779] Determine state 2 major and minor 7:730
2016-08-05 11:21:09.209[290:19779] Entered region B9407F30-F5F8-466E-AFF9-25556B57FE6D:7:730 <–enterRegion 7:730
2016-08-05 11:21:09.356[290:19779] Determine state 1 major and minor 7:730
2016-08-05 11:21:09.511[290:19779] Determine state 1 major and minor 7:730
2016-08-05 11:21:17.382[290:19779] Determine state 2 major and minor 7:72
2016-08-05 11:22:28.214[290:19779] Exiting region 7:730 <----- only one exit
2016-08-05 11:22:28.357[290:19779] Determine state 2 major and minor 7:730
2016-08-05 11:22:36.396[290:19779] Determine state 2 major and minor 7:730
2016-08-05 11:22:36.399[290:19779] Determine state 2 major and minor 7:72

Gotcha—thanks for mentioning that the problem is inconsistent. I have in fact seen rare occurrences of something like that before—I was testing how didEnter/Exit behave compared to didDetermineState on-site at a customer’s, and occasionally, these two would “desync” like what you’ve observed yourself. I chalked that up to a bug in the iBeacon API (I was testing with pure Core Location and not Estimote SDK). Maybe you could open a bug report with Apple?

I see, it seems quite odd though that I encounter this problem so often instead of the rare occurrences that you are mentioning.
Anyway I will report this problem to Apple. Two questions: since you’re talking of the Core Location, switching to Eddystone doesn’t resolve the problem, am I wrong?

Do you know of similar problems with the following sequence entering region 1->exiting region 1 -> entering region 2 -> exiting region 2 ?

Thanl you very much for your help

Yes, very odd indeed!

I guess you might have tried that already, but does rebooting the phone or reinstalling the app help? Also, might be a good idea indeed to test with your other iOS devices, to rule out some Bluetooth problem with that iPhone.

Hello,
sorry for the late reply, I was on holidays.
I tried to reinstall the app but nothing changed. I’ll try your advices, I will post here if something new happens.

Thanks