Commit 26cd0c6d authored by Terrillo Walls's avatar Terrillo Walls

Saving weight in the past

parent 06aaa2b9
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
- (void)body_saveWeight:(NSDictionary *)input callback:(RCTResponseSenderBlock)callback - (void)body_saveWeight:(NSDictionary *)input callback:(RCTResponseSenderBlock)callback
{ {
double weight = [RCTAppleHealthKit doubleValueFromOptions:input]; double weight = [RCTAppleHealthKit doubleValueFromOptions:input];
NSDate *sampleDate = [RCTAppleHealthKit dateFromOptionsDefaultNow:input]; NSDate *sampleDate = [RCTAppleHealthKit dateFromOptions:input key:@"startDate" withDefault:[NSDate date]];
HKUnit *unit = [RCTAppleHealthKit hkUnitFromOptions:input key:@"unit" withDefault:[HKUnit poundUnit]]; HKUnit *unit = [RCTAppleHealthKit hkUnitFromOptions:input key:@"unit" withDefault:[HKUnit poundUnit]];
HKQuantity *weightQuantity = [HKQuantity quantityWithUnit:unit doubleValue:weight]; HKQuantity *weightQuantity = [HKQuantity quantityWithUnit:unit doubleValue:weight];
......
...@@ -79,6 +79,7 @@ AppleHealthKit.initHealthKit(options: Object, (err: string, results: Object) => ...@@ -79,6 +79,7 @@ AppleHealthKit.initHealthKit(options: Object, (err: string, results: Object) =>
## Changelog ## Changelog
0.6.4v 0.6.4v
- Basal energy ([#23](https://github.com/terrillo/rn-apple-healthkit/pull/23)) - Basal energy ([#23](https://github.com/terrillo/rn-apple-healthkit/pull/23))
- Fixed issues with saving weight in the past
0.6.3v 0.6.3v
- Food and Water ([#19](https://github.com/terrillo/rn-apple-healthkit/pull/19)) - Food and Water ([#19](https://github.com/terrillo/rn-apple-healthkit/pull/19))
......
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