Skip to content

[Bug]: iOS: Geofence exit event is triggered 60~70 meters outside the configured geofence boundary #2597

@igorkos

Description

@igorkos

Required Reading

  • Confirmed

Plugin Version

5.1.1

Mobile operating-system(s)

  • iOS
  • Android

Device Manufacturer(s) and Model(s)

iPhone 12 mini, iPhone 17 Pro Max

Device operating-systems(s)

iOS 26.3.1

React Native / Expo version

0.76.9

What happened?

We are using the Background Geolocation SDK with geofence monitoring enabled. The geofence entry/exit events are working, but the geofence exit event is consistently delayed and is only triggered when the device is approximately 60-70 meters outside the configured geofence radius.
This creates an inaccurate user experience because users are considered inside the geofence for a noticeable distance after they have already crossed the boundary.

Plugin Code and/or Config

const DEFAULT_CONFIGURATION: Config = {
  logger: {
    debug: true,
    logLevel: 5,
    logMaxDays: 7,
  },
  geolocation: {
    desiredAccuracy: -1,
    distanceFilter: 30,
    elasticityMultiplier: 0.2,
    disableElasticity: false,
    geofenceModeHighAccuracy: true,
    locationAuthorizationRequest: 'Always',
  },
  http: {
    url: `firebaseCloudFun/storeUserLocation`,
    headers: {
      'Content-Type': 'application/json',
      Authorization: 'Bearer ${firebase token}',
    },
    method: 'POST',
    autoSync: true,
    batchSync: false,
    rootProperty: 'data',
  },
  app: {
    stopOnTerminate: false,
    preventSuspend: true,
    startOnBoot: true,
  },
  persistence: {
    maxDaysToPersist: 30,
    locationsOrderDirection: 'DESC',
    persistMode: 0,
    extras: {
      userId: 'current user ID',
    },
  },
}

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions