areLocationServicesEnabled

Whether the device's system-level Location Services switch is on.

Check it before startVisitDetection - with the switch off no app receives location and visit detection fails with LOCATION_SERVICES_DISABLED. Same as facilities().areLocationServicesEnabled(), which it replaces.

Android (Kotlin)

if (!AFCore.locations().areLocationServicesEnabled()) {
showTurnOnLocationPrompt { AFCore.locations().openLocationSettings() }
}

iOS (Swift)

if !AFCore.shared.locations().areLocationServicesEnabled() {
showTurnOnLocationPrompt { AFCore.shared.locations().openLocationSettings() }
}