Commit 326e9df2 authored by Greg Wilson's avatar Greg Wilson

updated examples/BodyMeasurements app body store to reflect change in...

updated examples/BodyMeasurements app body store to reflect change in RCTAppleHealthKit method naming conventions
parent 6152d9f5
...@@ -143,8 +143,8 @@ class BodyStore extends airflux.Store { ...@@ -143,8 +143,8 @@ class BodyStore extends airflux.Store {
_fetchHealthKitUserWeight() { _fetchHealthKitUserWeight() {
let self = this; let self = this;
AppleHealthKit.getCurrentWeight(null, (err, weight) => { AppleHealthKit.getLatestWeight(null, (err, weight) => {
if(this._handleHealthKitError(err, 'getCurrentWeight')){ if(this._handleHealthKitError(err, 'getLatestWeight')){
return; return;
} }
weight = _.round(weight,1); weight = _.round(weight,1);
...@@ -161,8 +161,8 @@ class BodyStore extends airflux.Store { ...@@ -161,8 +161,8 @@ class BodyStore extends airflux.Store {
_fetchHealthKitUserHeight() { _fetchHealthKitUserHeight() {
let self = this; let self = this;
AppleHealthKit.getMostRecentHeight(null, (err, height) => { AppleHealthKit.getLatestHeight(null, (err, height) => {
if(this._handleHealthKitError(err, 'getMostRecentHeight')){ if(this._handleHealthKitError(err, 'getLatestHeight')){
return; return;
} }
console.log("HEIGHT: ", height); console.log("HEIGHT: ", height);
...@@ -200,8 +200,8 @@ class BodyStore extends airflux.Store { ...@@ -200,8 +200,8 @@ class BodyStore extends airflux.Store {
_fetchHealthKitBodyFatPercentage() { _fetchHealthKitBodyFatPercentage() {
let self = this; let self = this;
AppleHealthKit.getMostRecentBodyFatPercentage({blah:true}, (err, fatPercentage) => { AppleHealthKit.getLatestBodyFatPercentage({blah:true}, (err, fatPercentage) => {
if(this._handleHealthKitError(err, 'getMostRecentBodyFatPercentage')){ if(this._handleHealthKitError(err, 'getLatestBodyFatPercentage')){
return; return;
} }
console.log("BODY FAT PERCENTAGE: ", fatPercentage); console.log("BODY FAT PERCENTAGE: ", fatPercentage);
...@@ -217,8 +217,8 @@ class BodyStore extends airflux.Store { ...@@ -217,8 +217,8 @@ class BodyStore extends airflux.Store {
_fetchHealthKitLeanBodyMass() { _fetchHealthKitLeanBodyMass() {
let self = this; let self = this;
AppleHealthKit.getMostRecentLeanBodyMass({blah:true}, (err, leanMass) => { AppleHealthKit.getLatestLeanBodyMass({blah:true}, (err, leanMass) => {
if(this._handleHealthKitError(err, 'getMostRecentLeanBodyMass')){ if(this._handleHealthKitError(err, 'getLatestLeanBodyMass')){
return; return;
} }
console.log("LEAN BODY MASS: ", leanMass); console.log("LEAN BODY MASS: ", leanMass);
......
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