Health Kit Diagnostics
A snapshot of Apple HealthKit diagnostic information for debugging purposes.
Obtain an instance via AFHealthTracking.getHealthKitDiagnostics() (iOS / watchOS).
Important Apple privacy note: HealthKit does not expose whether the user granted or denied individual read permissions. authorizationRequestStatus only tells you whether the permission dialog has been shown — not the user's actual choices. If the user denied a specific type, your app simply receives no data for that type.
Sample usage (Swift interop / Kotlin):
val diag = AFHealthTracking.getHealthKitDiagnostics()
println(diag)
if (!diag.isHealthDataAvailable) {
// HealthKit is not supported on this device (e.g., iPad)
}
if (diag.authorizationRequestStatus == HealthKitAuthRequestStatus.SHOULD_REQUEST) {
AFHealthTracking.requestPermissions(null)
}Constructors
Properties
Whether the authorization dialog has already been presented. Per Apple's privacy model this reflects only whether the prompt was shown, not the user's per-type read choices.
Device model string (e.g. "iPhone", "Apple Watch").
true when HealthKit is supported on this device (HKHealthStore.isHealthDataAvailable()); false on hardware without HealthKit, e.g. iPad.
Human-readable names of the HealthKit data types the SDK requested read access to.
Apps and devices that have contributed step-count data to HealthKit; empty when none are found or the probe could not run.
Inferred step-tracking read-permission status, derived from a data-query probe rather than a direct API (HealthKit does not expose read grants).