getStepCount().md 569 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11
Get the aggregated total steps for a specific day (starting and ending at midnight).

An optional options object may be provided containing `date` field representing the selected day. If `date` is not set or an options object is not provided then the current day will be used.
```javascript
let d = new Date(2016,1,1);
let options = {
    date: d.toISOString()
};
```

```javascript
Terrillo Walls's avatar
Terrillo Walls committed
12
AppleHealthKit.getStepCount(options: Object, (err: Object, results: Object) => {
13 14 15 16 17 18 19 20 21 22 23 24
    if (err) {
        return;
    }
    console.log(results)
});
```

```javascript
{
	value: 213,
}
```