kvs-coder / HealthKitReporter

HealthKitReporter. A wrapper for HealthKit framework. Helps to write or read data from Apple Health via HealthKit framework.
https://cocoapods.org/pods/HealthKitReporter
MIT License
70 stars 20 forks source link

New Asleep types to be added #18

Closed mazzonem closed 1 year ago

mazzonem commented 1 year ago

Describe the bug Since Xcode 14, the sleep types changed, specifically Asleep is replaced by more types. ( see doc https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis)

These new types will need to be added to the following file (keeping Asleep) to support it. https://github.com/VictorKachalov/HealthKitReporter/blob/master/Sources/Decorator/Extensions%2BHKCategoryValueSleepAnalysis.swift

And updating the libraries depending on it (like Flutter health kit reporter)

To Reproduce Steps to reproduce the behavior:

  1. Run the library with Xcode 14
  2. Get sleep records including some asleep
  3. See types are returned as unknown.

Expected behavior Return the actual types

kvs-coder commented 1 year ago

Hi @mazzonem

I added new sleep types in 1.7.0