From 0fefa672ac08e34bfcc7abd2a92f692818e5d9fe Mon Sep 17 00:00:00 2001 From: 20150024 Date: Thu, 12 Jul 2018 12:35:59 +0800 Subject: [PATCH] round QuantitySamples value --- RCTAppleHealthKit/RCTAppleHealthKit+Queries.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RCTAppleHealthKit/RCTAppleHealthKit+Queries.m b/RCTAppleHealthKit/RCTAppleHealthKit+Queries.m index 2e838fe..504dcbf 100644 --- a/RCTAppleHealthKit/RCTAppleHealthKit+Queries.m +++ b/RCTAppleHealthKit/RCTAppleHealthKit+Queries.m @@ -77,7 +77,7 @@ for (HKQuantitySample *sample in results) { HKQuantity *quantity = sample.quantity; - double value = [quantity doubleValueForUnit:unit]; + int value = round([quantity doubleValueForUnit:unit]); int startDateTimestamp = [RCTAppleHealthKit buildTimestampFromDate:sample.startDate]; int endDateTimestamp = [RCTAppleHealthKit buildTimestampFromDate:sample.endDate]; -- 2.26.2