getDatesToSync

abstract suspend fun getDatesToSync(): List<LocalDate>

Asks the server which dates still need health data.

The server tracks which dates have been submitted. This returns the gaps — dates for which the server has no data yet. Used internally by syncSteps but also exposed for manual sync flows.

Returns an empty list (without throwing) if no member ID is available, the server returns no dates, or a network error occurs.

Kotlin

val dates = AFCore.smartWalking().getDatesToSync()
Log.d("SmartWalking", "Need to sync ${dates.size} dates: $dates")

Swift

let dates = try await AFCore.shared.smartWalking().getDatesToSync()
print("Need to sync \(dates.count) dates")

Return

A sorted, deduplicated list of LocalDate values that need syncing.