correlations don't have always one unit of measurement. The example comes with food, where a correlation can have weights (like for sugar, or vitamins) as well as energy (calories) and volumes (litres of water). A solution could be, instead of passing one unit, to pass an array of units.
correlations don't have always one unit of measurement. The example comes with food, where a correlation can have weights (like for sugar, or vitamins) as well as energy (calories) and volumes (litres of water). A solution could be, instead of passing one unit, to pass an array of units.
Here is how the implementation would look like:
you will also need to define
HKPluginKeyUnits
at the beginning as:static NSString *const HKPluginKeyUnits = @"units";
I am using this code myself and it's working good!