Skip to content

Latest commit

 

History

History
35 lines (27 loc) · 593 Bytes

saveBodyTemperature.md

File metadata and controls

35 lines (27 loc) · 593 Bytes

saveBodyTemperature

save a body temperature value to Healthkit

saveBodyTemperature accepts an options object containing a value:

Example input options:

let options = {
  value: 96,
  date: new Date(2016, 5, 1).toISOString(), // optional; default now
  unit: 'celsius', // optional, default fahrenheit
}

Call the method:

AppleHealthKit.saveBodyTemperature(
  (options: HealthInputOptions),
  (err: Object, results: number) => {
    if (err) {
      return
    }
    // body fat percentage successfully saved
  },
)

Example output:

96