From 5005b86a3b350237645f2e549bbabfb639cf40fb Mon Sep 17 00:00:00 2001 From: Greg Wilson Date: Tue, 28 Jun 2016 19:07:53 -0400 Subject: [PATCH] some fixes --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3befe06..45bdcbb 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ var AppleHealthKit = require('react-native-apple-healthkit'); let healthKitOptions = { permissions: { read: ["Height", "Weight", "Steps", "DateOfBirth", "BodyMassIndex"], - write: ["Weight", "Steps"] + write: ["Weight", "Steps", "BodyMassIndex"] } }; @@ -74,7 +74,7 @@ var _ = require('lodash'); ... -AppleHealthKit.getCurrentWeight(null, (err, weight) => { +AppleHealthKit.getLatestWeight(null, (err, weight) => { if(err){ console.log("error getting current weight: ", err); return; @@ -86,7 +86,7 @@ AppleHealthKit.getCurrentWeight(null, (err, weight) => { ... let myWeight = 200; -AppleHealthKit.saveWeight({weight:myWeight}, (err, res) => { +AppleHealthKit.saveWeight({value:myWeight}, (err, res) => { if(err){ console.log("error saving weight to healthkit: ", err); return; @@ -150,7 +150,7 @@ initialize HealthKit. this will show the HealthKit permissions prompt for any re let healthKitOptions = { permissions: { read: ["Height", "Weight", "Steps", "DateOfBirth", "BodyMassIndex"], - write: ["Weight"] + write: ["Weight", "Steps", "BodyMassIndex"] } }; ``` -- 2.26.2