save a carbohydrate sample to Healthkit
saveCarbohydratesSample accepts an options object containing a value and unit:
Example input options:
let options = {
value: 16.7,
date: new Date(2020, 1, 1).toISOString(),
unit: 'gramUnit', // Optional, default is gram
metadata: {
HKWasUserEntered: true,
anyOtherKey: 'some data', // supports string, number, boolean
Call the method:
(options: HealthInputOptions),
(err: Object, results: string) => {
if (err) {
// blood glucose successfully saved
Example output (record's UUID):