sync Steps
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}")
}
}Content copied to clipboard
iOS (Swift)
Task {
do {
try await AFCore.shared.smartWalking().syncSteps()
self.showMessage("Sync complete")
} catch {
self.showError("Sync failed: \\(error.localizedDescription)")
}
}Content copied to clipboard