iOS Background Location / Geofencing for Automatic Attendance — App Not Triggering Reliably
We are developing an enterprise attendance application called Attendo, which uses location-based geofencing for automatic employee check-in/check-out.
Business requirement
The application needs to work as follows:
- An employee is assigned an office/work location with a defined radius.
- When the employee enters the configured radius, the application should automatically record a Check-In.
- When the employee leaves the radius, the application should automatically record a Check-Out.
- This should happen without the employee having to open the application.
- The functionality needs to work even when the application is in the background and, where supported by iOS, after the application has been terminated.
For example:
«Office geofence = 200 meters Employee enters the 200 m radius → automatic Check-In Employee leaves the 200 m radius → automatic Check-Out»
Current iOS implementation
We are using iOS location services with:
- Location permission: Always
- Precise Location: enabled
- Background Location capability enabled
- Background location updates enabled
- Geofencing / region monitoring
- The application is intended to respond to location/geofence events without requiring the user to open the app.
However, we are seeing cases where the application does not reliably receive/process the required location/geofence event when the application has been in the background for an extended period.
The same business workflow works more reliably while the application is active.
Our concern
Our understanding is that iOS does not allow an application to maintain a continuously running background service in the same way that Android can.
However, our requirement does not necessarily require continuous GPS polling if there is an Apple-supported mechanism that can reliably wake/relaunch the application when a user crosses a geofence.
We would therefore like to understand the recommended architecture for this use case.
Questions
-
Is Core Location Region Monitoring the recommended mechanism for an enterprise geofencing application that needs to detect entry/exit while the app is not running?
-
Can iOS relaunch the application after it has been terminated by the user/system when a monitored region is entered or exited?
-
Is there any supported way to guarantee that an application will continue receiving location/geofence events after it has been in the background for a long period?
-
Does enabling:
- "UIBackgroundModes = location"
- "allowsBackgroundLocationUpdates"
- "CLLocationManager"
- Region Monitoring
provide the expected behavior, or are there additional requirements/configurations we should consider?
-
Are there known limitations regarding:
- Low Power Mode
- device movement speed
- GPS/location accuracy
- stationary devices
- iOS terminating/suspending the application
- force-quitting the application from the App Switcher
- large/small geofence radius
- multiple monitored regions
-
Is it possible to use significant-change location updates + region monitoring together for this type of attendance workflow?
-
For an enterprise application where the user explicitly grants Always Allow Location permission and Precise Location is enabled, what level of reliability can realistically be expected from iOS geofencing?
Important business constraint
We cannot require employees to manually open the application every time they arrive at or leave the workplace.
The objective is an automatic attendance system, where the employee's entry and exit from the workplace geofence is detected by iOS and the application records the corresponding attendance event.
We understand that iOS is designed to protect battery life and user privacy and that continuous background execution may not be permitted. We are therefore looking for the Apple-recommended architecture for achieving this requirement using supported iOS APIs, rather than trying to circumvent iOS background execution policies.
Any guidance from Apple engineers or developers who have implemented reliable enterprise geofencing would be greatly appreciated.