disableAutoSync

abstract suspend fun disableAutoSync()

Disables automatic background step synchronization.

Tears down the HealthKit background delivery observer (iOS/watchOS) or cancels the WorkManager periodic task (Android). Updates the persisted preference so auto-sync is not re-enabled on next app launch.

Idempotency: If auto-sync is already disabled, this is a no-op.

Kotlin

AFCore.smartWalking().disableAutoSync()
Log.i("SmartWalking", "Background sync disabled")

Swift

try await AFCore.shared.smartWalking().disableAutoSync()