Commit 13e4959a authored by Greg Wilson's avatar Greg Wilson

Merge branch 'master' of github.com-GregWilson:GregWilson/react-native-apple-healthkit

parents 6d5dbe83 93892c11
......@@ -3,9 +3,13 @@ A React Native bridge module for interacting with [Apple HealthKit] data.
![Alt text](https://devimages.apple.com.edgekey.net/assets/elements/icons/healthkit/healthkit-64x64.png "Apple HealthKit")
#### Notice
*This package is undergoing rapid development and should be considered unstable for the time being.
<strong>Use at your own risk</strong>*
#### Table of Contents
* [Getting Started](#getting-started)
* [Installation](#installation-xcode)
* [Installation](#installation)
* [Usage](#usage)
* [Documentation](#documentation)
* [Permissions](#permissions)
......@@ -13,6 +17,7 @@ A React Native bridge module for interacting with [Apple HealthKit] data.
* [isAvailable](#isavailable)
* [initHealthKit](#inithealthkit)
* [getStepCountForToday](#getstepcountfortoday)
* [getStepCountForDay](#getstepcountforday)
* [getLatestWeight](#getlatestweight)
* [saveWeight](#saveweight)
* [getLatestHeight](#getlatestheight)
......@@ -169,7 +174,6 @@ AppleHealthKit.initHealthKit(healthKitOptions: object, (err: string, res: object
___
#### **`getStepCountForToday`**
get the the aggregated total steps for the current day starting and ending at midnight
```javascript
......@@ -183,6 +187,23 @@ AppleHealthKit.getStepCountForToday(null, (err: Object, steps: number) => {
___
#### **`getStepCountForDay`**
get the the aggregated total steps for the day provided as `date` in options object. the `date` field expects an ISO date string as its value
```javascript
let d = new Date(2016,5,27);
let options = {
date: d.toISOString()
};
AppleHealthKit.getStepCountForDay(options, (err, steps) => {
if(this._handleHealthKitError(err, 'getStepCountForDay')){
return;
}
// steps is the step count for day 'd'
});
```
___
#### **`getLatestWeight`**
get the most recent weight value
```javascript
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment