Commit 352bbd42 authored by Greg Wilson's avatar Greg Wilson Committed by GitHub

Update README.md

parent 6005ce08
...@@ -105,7 +105,8 @@ Write Permissions: ...@@ -105,7 +105,8 @@ Write Permissions:
### Methods ### Methods
**`isAvailable`** : check if HealthKit is available on the device #### **`isAvailable`**
check if HealthKit is available on the device
```javascript ```javascript
AppleHealthKit.isAvailable((err: string, available: bool) => { AppleHealthKit.isAvailable((err: string, available: bool) => {
if(available){ if(available){
...@@ -115,7 +116,8 @@ AppleHealthKit.isAvailable((err: string, available: bool) => { ...@@ -115,7 +116,8 @@ AppleHealthKit.isAvailable((err: string, available: bool) => {
``` ```
___ ___
**`initHealthKit`** : check if HealthKit is available on the device #### **`initHealthKit`**
check if HealthKit is available on the device
`initHealthKit` requires an options object with HealthKit permission settings. `initHealthKit` requires an options object with HealthKit permission settings.
```javascript ```javascript
...@@ -140,7 +142,8 @@ AppleHealthKit.initHealthKit(healthKitOptions: object, (err: string, res: object ...@@ -140,7 +142,8 @@ AppleHealthKit.initHealthKit(healthKitOptions: object, (err: string, res: object
___ ___
**`getCurrentWeight`** : get the most recent weight value #### **`getCurrentWeight`**
get the most recent weight value
```javascript ```javascript
AppleHealthKit.getCurrentWeight(null, (err: string, weight: number) => { AppleHealthKit.getCurrentWeight(null, (err: string, weight: number) => {
if(err){ if(err){
...@@ -154,7 +157,8 @@ AppleHealthKit.getCurrentWeight(null, (err: string, weight: number) => { ...@@ -154,7 +157,8 @@ AppleHealthKit.getCurrentWeight(null, (err: string, weight: number) => {
___ ___
### **`saveWeight`** : save a numeric weight value to HealthKit #### **`saveWeight`**
save a numeric weight value to HealthKit
`saveWeight` accepts an object containing a numeric weight value with the key *weight*: `saveWeight` accepts an object containing a numeric weight value with the key *weight*:
```javascript ```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