are Location Services Enabled
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() }
}Content copied to clipboard
iOS (Swift)
if !AFCore.shared.locations().areLocationServicesEnabled() {
showTurnOnLocationPrompt { AFCore.shared.locations().openLocationSettings() }
}Content copied to clipboard