connect Apple Health Kit
iOS primary flow — connects Apple HealthKit and performs registration + permissions.
Platform: iOS only.
Return
true if the connection was successful; false otherwise.
Parameters
device Id
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)")
}
}Content copied to clipboard