Skip to content

Commit

Permalink
Merge pull request #94 from jgfino/master
Browse files Browse the repository at this point in the history
Support new lux HKUnit for iOS 17
  • Loading branch information
robertherber authored Jun 12, 2024
2 parents 61337a2 + 121ca13 commit 2b7c82a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ios/Serializers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 2b7c82a

Please sign in to comment.