[Bug]: iOS polygon geofence ENTER frequently missed since 5.x (stationary device / app terminated) — single polygon vs split polygons?
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 8/100
Research direction
The payload names no source files, tests or entry points, so there is no obvious starting file. It is a production support question asking five things, including whether the 5.6.0 stationarity change stops the polygon hit-tester before ENTER is confirmed. Checking that would require maintainer knowledge of the iOS native geofence code, and done would mean a maintainer answer, not a code change.
Written by the indexing model from the issue text.
Description
Required Reading
- Confirmed
Plugin Version
5.7.0
Flutter Doctor
$ flutter doctor
[✓] Flutter (Channel stable, 3.47.2, on macOS 26.5.2 25F84 darwin-arm64, locale en)
[✓] Xcode - develop for iOS and macOS (Xcode 26.1.1)
Mobile operating system(s)
- iOS
Device Manufacturer(s) and Model(s)
Many iPhone models in production (iPhone 11 through iPhone 17; most common: iPhone 16, 15, 14, 17 Pro, 17, 13)
Device operating system(s)
iOS 18.6 – iOS 27.2 (mostly iOS 26.x)
What happened?
We urgently need guidance — polygon geofence ENTER is no longer firing reliably on iOS, and it's affecting our users in production.
Current behaviour: we use a single polygon geofence per area in geofences-only mode (startGeofences()).
- Since upgrading from 4.18.2 to 5.7.0, polygon ENTER is missed on about 30% of days, compared with about 10% before the upgrade (same devices).
- On those days our app logs show no
onGeofencecallback at all while the device is inside the polygon. The same devices do receive ENTER on other days. - Misses are most common when the device arrives and then stays stationary, and when the app was terminated or suspended before arrival.
Expected behaviour: a polygon ENTER fires once the device is inside the polygon — including when the app was terminated/suspended, and when the device is stationary after arriving.
Attached image: two example areas (in metres) comparing our current single polygon (Option 1) with the same area split into smaller polygons (Option 2):
- Area A (~12.9 ha): Option 1 containing circle 286 m; Option 2 = 8 polygons, containing circles 53–125 m.
- Area B (~9.7 ha, long/narrow): Option 1 containing circle 395 m; Option 2 = 6 polygons, containing circles 86–165 m.
Questions:
- Would splitting into smaller polygons (Option 2) give more reliable polygon ENTER on iOS than a single polygon — when the app is terminated, suspended, or the device is stationary after arriving?
- Is there a minimum containing-circle size for a polygon below which polygon ENTER becomes unreliable on iOS?
- After a relaunch from terminated via the containing-circle event, does the polygon hit-tester keep running until ENTER is confirmed, even if the device becomes stationary before enough fixes are collected? Could the 5.6.0 change ("detects stationarity itself and releases location updates while the device is parked") stop it before ENTER is confirmed? That would match what we see.
- With smaller polygons, does each polygon use one of the 20 iOS regions, and can moving between adjacent polygons cause extra EXIT/ENTER events?
- Is there a configuration you recommend to make polygon ENTER more robust on iOS in these cases?
We're happy to try any test build or configuration you suggest.
Plugin Code and/or Config
await BackgroundGeolocation.ready(Config(
geolocation: const GeoConfig(
locationAuthorizationRequest: 'Always',
geofenceModeHighAccuracy: true,
geofenceProximityRadius: 2000,
geofenceInitialTriggerEntry: true,
showsBackgroundLocationIndicator: false,
useSignificantChangesOnly: true, // per your guidance, only applies to start()
filter: LocationFilter(
policy: LocationFilterPolicy.passThrough,
useKalman: false,
trackingAccuracyThreshold: 0,
odometerAccuracyThreshold: 0,
),
),
app: AppConfig(
startOnBoot: true,
stopOnTerminate: false,
enableHeadless: true,
),
http: HttpConfig(autoSync: false),
persistence: const PersistenceConfig(
persistMode: PersistMode.none,
maxRecordsToPersist: 0,
),
logger: LoggerConfig(logLevel: LogLevel.off),
reset: true,
isMoving: true,
));
// Geofences-only mode; start() (full tracking) is only used after an ENTER.
await BackgroundGeolocation.startGeofences();
// One polygon geofence per area:
await BackgroundGeolocation.addGeofence(Geofence(
identifier: '<zone-id>',
vertices: [/* polygon vertices */],
notifyOnEntry: true,
notifyOnExit: true,
extras: {/* app metadata */},
));
Relevant log output
Native plugin logging is disabled in production (logLevel: off) for privacy reasons,
so we don't have TSLocationManager logs from affected devices.
App-side logs confirm no onGeofence callback is received on the affected days.
- Dominant language
- Dart
- Stars
- 732
- Forks
- 287
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from transistorsoft/flutter_background_geolocation
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
transistorsoft/flutter_background_geolocation#1724 · 2 comments ·
-
[Bug]: tslocationmanager still depends on bcprov-jdk15to18 1.84 (CVE-2026-8763, CVE-2026-13506)Openbug
Difficulty 3/5 1-2 days Newbie friendliness 54/100
transistorsoft/flutter_background_geolocation#1725 · 1 comment ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 55/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 52/100
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
transistorsoft/flutter_background_geolocation#1721 · 1 comment ·
All issues in transistorsoft/flutter_background_geolocation
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
google/skills_lint.dart#165 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Maintainers usually reply within 1 day
-
good first issue help wanted translation
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
blankframe-tech/ThrottleIQ#23 ·
Maintainers usually reply within 5 days
-
good first issue mobile P0 size:S
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
trufi-association/trufi-core#1024 ·
Maintainers usually reply within 14 days