Skip to content

Latest commit

 

History

History
34 lines (27 loc) · 618 Bytes

saveMindfulSession.md

File metadata and controls

34 lines (27 loc) · 618 Bytes

saveMindfulSession

Each mindfulness sample represents a period of time with a startDate and an endDate. the options must contain startDate and endDate

Example input options:

let options = {
  startDate: new Date(2021, 0, 0).toISOString(), // required
  endDate: new Date().toISOString(), // optional; default now
}

Call the method:

AppleHealthKit.saveMindfulSession(
  (options: HealthInputOptions),
  (err: Object, results: number) => {
    if (err)
      return {
        return,
      }
    // mindfullSession successfully saved
  },
)

Example output:

0