Skip to content

Missing HealthKit permission for .restingHeartRate #56

@ahmedrezik

Description

@ahmedrezik

Description

The app requests read permission for .heartRate
(HealthGPTAppDelegate.swift:48) but the fetcher queries .restingHeartRate
(HealthDataFetcher.swift:122). These are distinct HKQuantityTypeIdentifier
values in HealthKit.

This causes fetchLastTwoWeeksRestingHeartRate() to silently return no
data, since the user was never prompted to authorize .restingHeartRate
access.

Reproduction

  1. Ensure you have resting heart rate data in Apple Health (verify in Health →
    Browse → Heart → Resting Heart Rate)
  2. Install HealthGPT and complete onboarding
  3. Grant all HealthKit permissions when prompted
  4. Note that the permission dialog asks for "Heart Rate" but never for
    "Resting Heart Rate"
  5. Open a chat and ask about your resting heart rate
  6. The LLM no Heart Rate data despite data existing in Apple Health

Expected behavior

The app should display the user's actual resting heart rate values (e.g., "52
bpm") in the health summary provided to the LLM, when that data exists in
Apple Health.

Code of Conduct

  • I agree to follow this project's Code of Conduct and Contributing Guidelines

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions