diff --git a/RCTAppleHealthKit/RCTAppleHealthKit+Methods_Body.m b/RCTAppleHealthKit/RCTAppleHealthKit+Methods_Body.m index 8fec38d4bae8f3091f392da38d6f73340aeea24e..ca11ae220822785933ee0a478ce51c883ff88566 100644 --- a/RCTAppleHealthKit/RCTAppleHealthKit+Methods_Body.m +++ b/RCTAppleHealthKit/RCTAppleHealthKit+Methods_Body.m @@ -82,7 +82,7 @@ - (void)body_saveWeight:(NSDictionary *)input callback:(RCTResponseSenderBlock)callback { 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]]; HKQuantity *weightQuantity = [HKQuantity quantityWithUnit:unit doubleValue:weight]; diff --git a/README.md b/README.md index 94c88a1c7a2befb8af33548cf9c1ff45f3ab1368..d59e3df26ce690088e2e23870f609588d89e1f93 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,7 @@ AppleHealthKit.initHealthKit(options: Object, (err: string, results: Object) => ## Changelog 0.6.4v - Basal energy ([#23](https://github.com/terrillo/rn-apple-healthkit/pull/23)) +- Fixed issues with saving weight in the past 0.6.3v - Food and Water ([#19](https://github.com/terrillo/rn-apple-healthkit/pull/19))