Methods beaconManager:didEnterRegion and beaconManager:didExitRegion is getting called continuously

I am developing a Beacon application. However I am facing an issue. I have found out that when the beacon device is at a certain distance away from the iPhone, both the methods beaconManager:didEnterRegion and beaconManager:didExitRegion keeps getting called repeatedly in a random manner. What am I doing wrong?

I’ve faced this inconsistency before. Basically, using a lower broadcasting power will help, but I wasn’t able to fix this all the time. Even with a 100ms interval, sometimes the app will “loose” the beacon and call didExitRegion. Inmediatly after that, it will call didEnterRegion when it founds the beacon again.

Yes, we’ve seen that before—this behavior originates in Apple’s own framework, Core Location, which makes it much harder for us to debug it, not to even mention fixing it. Can you try temporarily decreasing the beacon’s advertising interval to 100 ms, and see if you can reproduce the issue? Can you check what RSSI you’re getting at the distance in which you’re observing the problem? Our experiments show that the threshold value for enter/exit events in Core Location is -88 dBm, so if the RSSI is oscillating around that number, I guess that’d explain it. In which case, you might want to simply try bumping the Tx power a notch.

Finally, to help us debug further, would you mind following the instructions on https://developer.apple.com/bug-reporting/ios/bluetooth/ to install the Bluetooth Diagnostic Profile, reproduce the problem, and send us the logs? If you could also take note of the exact time when you’ve observed the problem, that’ll help us navigate the logs.

Thanks a ton for helping us work through this!

2 Likes

I’ve posted a workaround here, do check it out! Let me know if you discover any other workarounds too!

Hello everyone
I am experiencing the same issues… I don’t like to decrease the advertising interval too much (battery and stuff…). Is there an expected fix soon for this problem? Or is the only solution to increase advertising intervals? @chaychoong’s solution did not work for me. I am using a iPhone 6s and iOS 9.3.1

Im phasing same issue Im developing iOS application in a beacon manager after "startMonitoringForRegion I’m getting enter - exit - enter state continuously. I have updated latest sdk also but same issue occurs.

Same issue here … any work around? …even that sleep thing isn’t working !!

Some time there will no notification of both enter or exit !!