saveMindfulSession().md 450 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Each mindfulness sample represents a period of time with a startDate and an endDate.
the options must contain `startDate` and `endDate`

```javascript
let options = {
    startDate: (new Date(2016,10,1)).toISOString(), // required
    endDate: (new Date()).toISOString(), // optional; default now
};

```

```
AppleHealthKit.saveMindfulSession(options, (err, res) => {
  if (err) return {
    return
  }
  console.log('Mindful session saved')
});
```