We’ve just noticed something extremely odd with background ranging of Estimote beacons using iOS.
A bit of background: we’re just using standard
CoreLocation API here to do ranging using iBeacon, we’re not using Estimote’s API (though we are using Estimote beacons as iBeacons). We set up a tiny test app to just upload RSSI values to a local laptop in real time.
We’ve set the app to allow background mode (this is just a test app so we’ve not pushed it through the App store or anything).
In foreground, everything works great: we get accurate and frequent (every 1-2 seconds) RSSI values to the
didRangeBeacons callback. When we move the phone we see the RSSI values update accordingly.
However in background we’re seeing a problem. What we’ve observed is that although iOS continues to report back ranges to the
didRangeBeacons callback, pretty much at the same frequency, the actual values are stale (out of date). In fact, it seems like iOS is only really updating the true RSSI values every 30-60 seconds (depending on how long we’ve been in background mode). After that point, it seems to send the last value that it knew.
We can watch the RSSI values and see that it takes about 60 seconds for it to update to the new value (we’re testing this by moving the phone to extremely close to a different beacon each time).
I’m aware that iOS can choose to “suspend” the app if there is no new background information to send, but that isn’t what’s happening here.
My suspicion is that iOS is deciding to reduce the frequency of how often it actually ranges the beacons, and then is just “lying” in between.
Or maybe, it’s only ranging one or two of the beacons in turn or something.
Has anyone seen this issue before?