diff --git a/Sources/SpeziDevices/HealthMeasurements.swift b/Sources/SpeziDevices/HealthMeasurements.swift index bb2d99e..9e6bb20 100644 --- a/Sources/SpeziDevices/HealthMeasurements.swift +++ b/Sources/SpeziDevices/HealthMeasurements.swift @@ -84,6 +84,14 @@ import SwiftUI /// - ``discardMeasurement(_:)`` @Observable public final class HealthMeasurements: @unchecked Sendable { +#if compiler(<6) + public typealias WeightScaleKeyPath = KeyPath + public typealias BloodPressureKeyPath = KeyPath +#else + public typealias WeightScaleKeyPath = KeyPath & Sendable + public typealias BloodPressureKeyPath = KeyPath & Sendable +#endif + private let logger = Logger(subsystem: "ENGAGEHF", category: "HealthMeasurements") /// Determine if UI components displaying pending measurements should be displayed. @@ -135,14 +143,6 @@ public final class HealthMeasurements: @unchecked Sendable { } } -#if compiler(<6) - public typealias WeightScaleKeyPath = KeyPath - public typealias BloodPressureKeyPath = KeyPath -#else - public typealias WeightScaleKeyPath = KeyPath & Sendable - public typealias BloodPressureKeyPath = KeyPath & Sendable -#endif - /// Configure receiving and processing weight measurements from the provided service. /// /// Configures the device's weight measurements to be processed by the Health Measurements module.