Skip to content
This repository has been archived by the owner on Jun 14, 2022. It is now read-only.

Latest commit

 

History

History
18 lines (16 loc) · 679 Bytes

getDailyStepCountSamples().md

File metadata and controls

18 lines (16 loc) · 679 Bytes

Get the total steps per day over a specified date range.

getDailyStepCountSamples accepts an options object containing required startDate: ISO8601Timestamp and optional endDate: ISO8601Timestamp. If endDate is not provided it will default to the current time

let options = {
    startDate: (new Date(2016,1,1)).toISOString() // required
    endDate:   (new Date()).toISOString() // optional; default now
};
 AppleHealthKit.getDailyStepCountSamples(options: Object, (err: Object, results: Array<Object>) => {
    if (this._handleHealthkitError(err, 'getDailyStepCountSamples')) {
        return;
    }
    console.log(results)
});