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 to the user.
Device model string (e.g. "iPhone", "Apple Watch").
Whether HealthKit is available on this device (HKHealthStore.isHealthDataAvailable).
Human-readable names of the HealthKit data types requested for reading.
Apps and devices that have contributed step-count data to HealthKit.
Inferred step-tracking read-permission status based on a data-query probe.