From 825b9cc337e2d4c0f21ddfd1989dfef7eff4e9d9 Mon Sep 17 00:00:00 2001 From: Greg Wilson Date: Wed, 29 Jun 2016 18:27:56 -0400 Subject: [PATCH] export new RCT methods getWeightSamples, getHeightSamples, getBiologicalSex, and getDateOfBirth --- RCTAppleHealthKit/RCTAppleHealthKit.m | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/RCTAppleHealthKit/RCTAppleHealthKit.m b/RCTAppleHealthKit/RCTAppleHealthKit.m index 210bd63..a7705db 100644 --- a/RCTAppleHealthKit/RCTAppleHealthKit.m +++ b/RCTAppleHealthKit/RCTAppleHealthKit.m @@ -13,6 +13,7 @@ #import "RCTAppleHealthKit+Methods_Body.h" #import "RCTAppleHealthKit+Methods_Fitness.h" +#import "RCTAppleHealthKit+Methods_Characteristic.h" @implementation RCTAppleHealthKit @@ -29,11 +30,26 @@ RCT_EXPORT_METHOD(initHealthKit:(NSDictionary *)input callback:(RCTResponseSende [self initializeHealthKit:input callback:callback]; } +RCT_EXPORT_METHOD(getBiologicalSex:(NSDictionary *)input callback:(RCTResponseSenderBlock)callback) +{ + [self characteristic_getBiologicalSex:input callback:callback]; +} + +RCT_EXPORT_METHOD(getDateOfBirth:(NSDictionary *)input callback:(RCTResponseSenderBlock)callback) +{ + [self characteristic_getDateOfBirth:input callback:callback]; +} + RCT_EXPORT_METHOD(getLatestWeight:(NSDictionary *)input callback:(RCTResponseSenderBlock)callback) { [self body_getCurrentWeight:input callback:callback]; } +RCT_EXPORT_METHOD(getWeightSamples:(NSDictionary *)input callback:(RCTResponseSenderBlock)callback) +{ + [self body_getWeightSamples:input callback:callback]; +} + RCT_EXPORT_METHOD(saveWeight:(NSDictionary *)input callback:(RCTResponseSenderBlock)callback) { [self body_saveWeight:input callback:callback]; @@ -45,6 +61,11 @@ RCT_EXPORT_METHOD(getLatestHeight:(NSDictionary *)input callback:(RCTResponseSen [self body_getMostRecentHeight:input callback:callback]; } +RCT_EXPORT_METHOD(getHeightSamples:(NSDictionary *)input callback:(RCTResponseSenderBlock)callback) +{ + [self body_getHeightSamples:input callback:callback]; +} + RCT_EXPORT_METHOD(saveHeight:(NSDictionary *)input callback:(RCTResponseSenderBlock)callback) { [self body_saveHeight:input callback:callback]; -- 2.26.2