Retrieving long-term HealthKit HR data on an Apple Watch

I am pretty new to Swift development and I am currently developing my first project where I calculate the stress level of a person using the Heart Rate Variability samples from HealthKit. I finished the iOS app where I request all HRV samples from the past 120 days, this works perfectly. But when I try to do the same in my Apple Watch project, I am only able to retrieve data from the past 8 days. This seems weird to me, since the data is recorded on the Apple Watch itself and HealthKit has a shared database.

I am wondering if HealthKit just limits the predicates to 8 days for HR data on the Apple Watch or if this might be a problem with my Apple Watch?

Thanks in advance.
Answered by Frameworks Engineer in 659344022
Apple Watch has limited health data. It’s restricted to 8 days as you’ve noted. iPhone has all samples.
Accepted Answer
Apple Watch has limited health data. It’s restricted to 8 days as you’ve noted. iPhone has all samples.

Hi TiboSevenhant, Can you help me to find out stress level calculation of a person. I was trying to calculate human stress but didn't get any proper solution.

Retrieving long-term HealthKit HR data on an Apple Watch
 
 
Q