diff --git a/ios/Serializers.swift b/ios/Serializers.swift index 0064abfd..bcd8a9f8 100644 --- a/ios/Serializers.swift +++ b/ios/Serializers.swift @@ -107,6 +107,12 @@ func serializeUnknownQuantity(quantity: HKQuantity) -> [String: Any]? { } } + if #available(iOS 17.0, *) { + if quantity.is(compatibleWith: HKUnit.lux()) { + return serializeQuantity(unit: HKUnit.lux(), quantity: quantity) + } + } + if quantity.is(compatibleWith: SpeedUnit) { return serializeQuantity(unit: SpeedUnit, quantity: quantity) }