Issue with geolocation without using maps

I have an application that uses geolocation to track the user’s location and trigger actions when the app is in either the foreground or background. Currently, it seems that region entry is not triggered unless an app like Maps (which actively uses location services) is opened. The location permissions are correctly set to “Always” with precise location enabled. We are using geofencing to setup region and trigger actions when entering or leaving.

Is there something I’m missing in the configuration that could be preventing region monitoring from triggering properly when the app is in use or in background?

It wouldn't be possible to guess what you would be missing without seeing a project, but my first suspicion would be perhaps you are using regions that are too small for the location you are at.

Region Monitoring or the CLMonitor functionality rely on WiFi or Cellular signals and the accuracy/region radius you can work with is limited to the availability of signals in the area. While you can expect a 100-200 meter radius region to work reliably in a busy downtown area with plenty of WiFi and Cellular signals, in a remote rural area, you may find that a radius of a kilometer or more would be needed to reliably trigger entry/exit events.

Most common cause we see is this, and developers choosing very small regions (50 meters or smaller) that makes it improbable to have enough granular location information.


Argun Tekant /  DTS Engineer / Core Technologies

Are you using CLMonitor? I have the same problem where it's random which location that is triggered. I have 16 locations as test.

Issue with geolocation without using maps
 
 
Q