AFGeofencingStatus

The current monitoring status of the geofencing service.

This is the status payload reported by the geofencing API (via its status accessor and emitted as state changes occur). It captures both healthy monitoring states (ACTIVE, INACTIVE) and the precondition / failure states that block monitoring — chiefly the location-permission and Location-Services conditions a consumer must resolve before geofencing can run. Each value's KDoc notes the recommended remediation (e.g. re-prompting vs. routing the user to app settings vs. system Location Services).

Status flows as the SDK hydrates and as the user changes permissions: typically UNKNOWN → a permission/precondition state (PERMISSIONS_NOT_DETERMINED, PERMISSIONS_FOREGROUND_ONLY, PAUSED, …) → ACTIVE, with INACTIVE once monitoring is stopped.

Entries

Link copied to clipboard

Geofencing is monitoring regions and emitting events.

Link copied to clipboard

Geofencing is not currently monitoring (consumer hasn't started, or was stopped).

Link copied to clipboard

A non-recoverable error occurred.

Link copied to clipboard

The user has denied (or restricted) the app's per-app location permission. The fix is to direct the user to the app's settings page (openAppSettings).

Link copied to clipboard

The system permission prompt has not been answered yet — either the OS has never presented it, or the user dismissed it without choosing. Unlike PERMISSIONS_DENIED, the fix is not openAppSettings — call startMonitoring() again to re-trigger the prompt.

Link copied to clipboard

Location was granted, but only at approximate (reduced) accuracy — the iOS 14+ "Precise Location" toggle is off, or the Android 12+ "Approximate" (coarse-only) grant is in effect. The device can be located to ~1–5 km, not precisely.

Link copied to clipboard

The SDK has foreground location only; background access is missing. Sourced from iOS CLAuthorizationStatus.authorizedWhenInUse and from the Android "FINE/COARSE granted, ACCESS_BACKGROUND_LOCATION not granted" pair. Geofencing needs background access — route the user through openAppSettings() to escalate.

Link copied to clipboard

The system-level Location Services master switch is off (Settings → Privacy → Location Services on iOS, or Settings → Location on Android). No app on the device can receive location data until the user re-enables it. Direct the user to AFPermissions.openLocationSettings() rather than the app-specific settings page.

Link copied to clipboard

The device does not support geofencing (e.g. region monitoring unavailable).

Link copied to clipboard

Geofences are registered but waiting on a precondition (e.g. Always permission, Precise Location).

Link copied to clipboard

State not yet known — the SDK has not finished hydrating from preferences.

Properties

Link copied to clipboard

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Link copied to clipboard
expect val name: String
Link copied to clipboard
expect val ordinal: Int

Functions

Link copied to clipboard

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.