Hi, I have a problem with HealthKit. When fetching sleepAnalysis, instead of getting a record for every night, I get multiple records for each night. How can I calculate the total amount of time for every day from the startDate and the endDate of every record? Thanks.
HealthKit total sleep time
Add a Comment