2 Replies
      Latest reply on Apr 25, 2019 8:05 AM by Scott--R
      Scott--R Level 1 Level 1 (0 points)

        We use iBeacons with the interval set to 100mS as per Apple documentation.


        If we turn the iBeacons on / off, iOS will call the DidEnterRegion and DidExitRegion as expected with high reliability, and this works with our app in the kill state, background, and foreground all day long on every iPhone we test with. HOWEVER, if we walk towards / away from the iBeacons, we observe that occasionally DidExitRegion and DidEnterRegion are not called. We have even checked this by using DidDetermineState and sometimes we get the wrong state returned from iOS. The phone can be sitting right beside an iBeacon transmitting at 100mS intervals for an extended period of time and the phone doesn't know it is there. DidDetermineState will report that it's not there. We can also use DidDetermineState when there are no iBeacons around and it will return that the iBeacon is still in range when it is long gone - like hours or even days later it will STILL report that the iBeacon is present using DidDetermineState.


        None of this strange behaviour is observed if we turn the iBeacons on/off using a power switch. It only happens if we walk towards / away from the iBeacons.


        Sometimes (but not always) waking up the phone will cause it to immediately call DidEnterRegion (if the beacon is present and we walked towards it) or DidExitRegion (if the beacon is gone because we walked away from it). Often it will not correct the issue, leaving the iPhone thinking a specific iBeacon is present (using DidDetermineState) even after that iBeacon has been gone for hours or even days.


        We seem to get 100% success when we turn the iBeacons on / off - regardless of app state it works perfectly. We get about 90-95% success when walking towards / away from the iBeacons. We have tested this behaviour with multiple iBeacons and multiple iPhones and it is repeatable. It's driving us insane.


        This issue is causing extremely poor customer experiences, and it only exists on iOS devices. Our system runs perfectly on another platform.


        Has anyone ever experienced anything like this? Could it be that our app is not handling some sort of error being returned from DidDetermineState correctly?

        • Re: iOS sometimes does not call DidExit when iBeacon is gone
          KMT Level 9 Level 9 (15,135 points)

          Sorry, not sure if you're asking a question, or trying to Report Bugs ...?


               > HOWEVER, if we walk towards / away from the iBeacons, we observe that occasionally DidExitRegion and DidEnterRegion are not called.


          Remember, there are minimum distance/timing requirements that work to reduce in/out/in/out rapid/false triggers such as when a device is straddling a boundary. The process needs to know that otherwise minor back-to-back changes are actionable.


          If, however, you are seeing spurious activity, or activity that you believe should trigger a response but isn't, either file bugs, or burn a support ticket w/DTS and ask them to take a look at a project that demos the issue(s).

            • Re: iOS sometimes does not call DidExitRegion when iBeacon is gone
              Scott--R Level 1 Level 1 (0 points)

              Thanks KMT. Yes we know it typically takes around 30 seconds to detect the presence or absence of the iBeacon (sometimes its much less and sometimes its longer). I'm saying we have waited hours or even days for iOS to figure out that the iBeacon is present or gone and it just gets stuck reporting the wrong state. We can walk away from an iBeacon and with a fair degree of repeatability, the iPhone will think the iBeacon is still there days later and will report such even using DidDetermineState for region.


              To confirm the beacon is functioning reasonably well, we have also used multiple iPhones and Android phones at the same time. Android has no issues whatsoever, but the iPhones are not consistent. I could carry 2 iPhones running the same app at the same time and walk away from the same iBeacon. One will call DidExitRegion as I walk away and the other might not. Repeat the process and the iPhone that called DidExitRegion that last time might fail this time, while the one that failed to call DidExitRegion last time will call it this time.


              My question is has anyone ever observed any weird behaviour like this and found a solution for it??? The weirdest thing is that it happens when we move the phone away from the beacon, but does NOT happen if we simply turn the beacon on/off.


              If not, we will certainly use DTS. Just wanted to ping the community to see if perhaps this was a case of us not using some sort of error flag or something, causing it to get stuck.