Beacons do not fire until Estimote app detects on iOS

When I turn beacon detection on in my application, it does not start detecting beacons until I open up the Estimote app and search for beacons. Then my code fires every time. This is useless to me if iOS devices need the estimote app to be open. What can I do about this?

Your code absolutely doesn’t need the Estimote app to be open, or installed at all.

What you’re most likely observing is, you start monitoring for your beacons, and monitoring sometimes takes a while to trigger, because it uses low-power Bluetooth scanning, suitable for running in the background. The downside is, it sometimes takes some time to trigger events—in extreme circumstances, up to 15 minutes, but more likely up to a few minutes.

When you open the Estimote app, the app immediately starts ranging, which is using a more responsive (but also more power-hungry, so not suitable to be run at all times in the background) Bluetooth scanning. And, since the iPhone is already using it for the Estimote app, we suspect that iOS also uses the opportunity to scan for all beacons monitored by other apps—and trigger the appropriate events.

(There actually used to be a note in iBeacon documentation that running ranging together with monitoring makes monitoring more responsive.)

This does not occur on Android, but I’m still confused. If I start my
bluetooth procedures, immediately open the estimate app and click devices
my own app detects immediately. So what code is different? This doesn’t
make sense to me. This happens even when I restart the phone and never open
the estimate app. As I said this renders real world customer behavior
useless. Is there a modification I can make that will mimic the behavior of
the estimate app?

Hello @gma In your app, are you using:

locationManager.startRangingBeaconsInRegion(region)
locationManager.startMonitoringForRegion(region)

If you’re using both, then your app has two states of beacon listening. First, when the app is running in the foreground and open on the phone your device will be consistently listening and very responsive to the beacons in the region. Second, if the app is closed or your device screen locked then the app will only be listening in intervals to save battery. I found this article very helpful as it explains through experimentation how listening for beacons works.

http://developer.radiusnetworks.com/2015/04/21/max-beacon-regions-ios.html

EDIT: Try this article too, an update to the aforementioned. http://developer.radiusnetworks.com/2015/06/10/beacon-monitoring-in-the-background.html