syncSteps

abstract suspend fun syncSteps(): AFResult

Synchronizes health data (steps, calories, distance, etc.) with SmartWalking.

Automatically fetches dates to sync and posts data as needed.

Throws

if sync fails.

Android (Kotlin)

lifecycleScope.launch {
try {
AFCore.smartWalking().syncSteps()
showMessage("Sync complete")
} catch (t: Throwable) {
showError("Sync failed: ${t.message}")
}
}

iOS (Swift)

Task {
do {
try await AFCore.shared.smartWalking().syncSteps()
self.showMessage("Sync complete")
} catch {
self.showError("Sync failed: \\(error.localizedDescription)")
}
}