Commit 9c5f2734 authored by Evgenii Evstropov's avatar Evgenii Evstropov

remove depricated usage

parent 836ee64f
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
{ {
HKQuantityType *weightType = [HKQuantityType quantityTypeForIdentifier:HKQuantityTypeIdentifierBodyMass]; HKQuantityType *weightType = [HKQuantityType quantityTypeForIdentifier:HKQuantityTypeIdentifierBodyMass];
HKUnit *unit = [RCTAppleHealthKit hkUnitFromOptions:input]; HKUnit *unit = [RCTAppleHealthKit hkUnitFromOptions:input key:@"unit" withDefault:[HKUnit gramUnitWithMetricPrefix:HKMetricPrefixKilo]];
if(unit == nil){ if(unit == nil){
unit = [HKUnit gramUnit]; unit = [HKUnit gramUnit];
} }
...@@ -151,7 +151,7 @@ ...@@ -151,7 +151,7 @@
{ {
HKQuantityType *heightType = [HKQuantityType quantityTypeForIdentifier:HKQuantityTypeIdentifierHeight]; HKQuantityType *heightType = [HKQuantityType quantityTypeForIdentifier:HKQuantityTypeIdentifierHeight];
HKUnit *unit = [RCTAppleHealthKit hkUnitFromOptions:input]; HKUnit *unit = [RCTAppleHealthKit hkUnitFromOptions:input key:@"unit" withDefault:[HKUnit meterUnitWithMetricPrefix:HKMetricPrefixCenti]];;
if(unit == nil){ if(unit == nil){
unit = [HKUnit meterUnit]; unit = [HKUnit meterUnit];
} }
...@@ -217,7 +217,7 @@ ...@@ -217,7 +217,7 @@
double height = [RCTAppleHealthKit doubleValueFromOptions:input]; double height = [RCTAppleHealthKit doubleValueFromOptions:input];
NSDate *sampleDate = [RCTAppleHealthKit dateFromOptionsDefaultNow:input]; NSDate *sampleDate = [RCTAppleHealthKit dateFromOptionsDefaultNow:input];
HKUnit *heightUnit = [RCTAppleHealthKit hkUnitFromOptions:input]; HKUnit *heightUnit = [RCTAppleHealthKit hkUnitFromOptions:input key:@"unit" withDefault:[HKUnit inchUnit]];;
if(heightUnit == nil){ if(heightUnit == nil){
heightUnit = [HKUnit inchUnit]; heightUnit = [HKUnit inchUnit];
} }
......
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