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

Added Original HKQuantity as it was required to Convert unit #14

Closed jvigneshcs closed 3 years ago

jvigneshcs commented 3 years ago

Status

READY

Migrations

YES

Description

When converting unit, we require HKQuantitySample, since the codable QuantitySample converted metadata to [String: String], when we try to create HKQuantitySample with QuantitySample it crashes as it expects some of the values of metadata to be in actual type instead of String.

Related PRs

List related PRs against other branches:

branch DEV other_pr_production link other_pr_master link Todos Tests Documentation

Deploy Notes

Notes regarding deployment the contained body of work. These should note any db migrations, etc.

Steps to Test or Reproduce

Outline the steps to test or reproduce the PR here.

git pull --prune git checkout

Impacted Areas in Application

Small description about what will be changed in the app if this PR will be merged

List general components of the application that this PR will affect:

The direct changes inside the app made by this PR

kvs-coder commented 3 years ago

Please sorry for a really long time of this PR pemding.

I doubt we need this code, since the idea was to get away from orignal HK in order to provide the Codable extensions. Adding original HKQuantitySample as a property of the Codable struct does not fullfill the library's goal.

If it would possible though to provide Codable extensions to HKObject, the half of the code in this library could be deleted :)