Reliable region monitoring (geofence-based) while app is killed

I am developing an app used by public safety agencies. Part of the app is used to determine live agency staffing using geofences. For example, a geofence exists around a station, and when a user enters or exits that geofence, the app updates the staffing count at that station in real time.

The issue I am having is reliably detecting when a user enters or exits the geofence while the app is killed (meaning the user force quit the app from the app launcher). I understand that iOS can relaunch an app in the background if the system terminated the process using Region Monitoring, but I haven't gotten a clear answer about whether or how this is possible if the user kills (force quits) the app.

Thank you in advance for your assistance.

The app will indeed be relaunched using Region Monitoring even if force quit.

Reliability problems usually occur if the region around the station is not suitably set. There are a number of reasons, and some misplaced expectations on how region monitoring works that could be causing this:

  • the region could not be placed correctly. A common issue is to use coordinates from a map or obtained otherwise. As region monitoring is based on WiFi and mobile signals, and those are affected by attenuation and reflections, as far as region monitoring goes, exact coordinates from a map may not be in the correct position. So, if you are having an issue with a certain location, you may want to double check that you see yourself located at the correct place and get the center coordinates according to live location rather than using a map or otherwise obtained coordinates.
  • the region could be too small. Depending on the environment, the minimum radius could vary between 100 to 500 meters (and sometimes more, in rural areas). If you are trying to geofence the building itself, it might be too small. Try with a larger radius to see if the triggers get more reliable.
  • if the app needs to be relaunched, there is a throttle of once launch every 3-5 minutes. Sometimes wee see this hit during testing as one gets in and out of the region more frequently than in real life conditions, and this gets the app launches throttled.
  • again related to the size, for an entry trigger the device has to cross into the region by a certain amount, and then stay there for a while (to avoid false triggers due to signal variances and devices just passing by). Sometimes if the region is too small, these conditions cannot be met reliably.

So, if the region triggers are working sometimes and not working some other times, this usually is not due to your code, but conditions surrounding the set regions. So you may want to investigate starting there.

Reliable region monitoring (geofence-based) while app is killed
 
 
Q