AFGeofencing Status
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
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).
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.
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.
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.
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.
The device does not support geofencing (e.g. region monitoring unavailable).
Properties
Functions
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.)
Returns an array containing the constants of this enum type, in the order they're declared.