connectAppleHealthKit

abstract suspend fun connectAppleHealthKit(deviceId: String): SmartWalkingProfile

iOS primary flow — connects Apple HealthKit and performs registration + permissions.

Platform: iOS only.

Return

true if the connection was successful; false otherwise.

Parameters

deviceId

HealthKit device identifier to associate.

Throws

if the connection fails or the user denies permissions.

Swift

Task {
do {
try await AFCore.shared.smartWalking().connectAppleHealthKit(deviceId: "DEVICE_ID")
self.showMessage("HealthKit connected")
} catch {
self.showError("HealthKit connection failed: \\(error.localizedDescription)")
}
}