share Location Now
Shares the member's current location right away, outside the automatic triggers - for example after the member opens a map. The opt-in, login, permission and location-fix gates still apply; the throttle does not.
Use it when the server needs a fresh location now - it replaces AFCore.fireDebugHeartbeat(). A suppressed attempt (not opted in, no permission, no fix) is a normal result, not an error.
Android (Kotlin)
lifecycleScope.launch {
val status = AFCore.locations().shareLocationNow()
if (status.outcome != AFHeartbeatOutcome.SENT) showNotShared(status.outcome)
}Content copied to clipboard
iOS (Swift)
Task {
do {
let status = try await AFCore.shared.locations().shareLocationNow()
if status.outcome != .sent { showNotShared(status.outcome) }
} catch {
showError(error)
}
}Content copied to clipboard
Return
The recorded AFHeartbeatStatus for this attempt.