One Logo Pool Ball
SensorKit · IOS API REFERENCE

SRDataSensor

protocol · iOS 27.0+ · SDK 27.1

protocol SRDataSensor : Hashable, Sendable

`SRDataSensor` serves as the foundational protocol for all sensor types, providing type safety and consistency across the SensorKit ecosystem. Each conforming sensor type specifies the kind of data it produces, enabling compile-time verification and type-safe data access patterns. ## Protocol Requirements ## Usage Example ```swift // Using a specific sensor type let temperatureSensor: SRWristTemperatureSensor = .wristTemperature // Creating a reader with type safety guard let reader = SRReader(sensor: temperatureSensor) else { print("Failed to create reader") return } // The reader automatically knows the sample type for try await response in reader.fetch(request) { if let sample: SRWristTemperatureSession = response.sample() { // Type-safe access to temperature data print("Temperature: \(sample.temperature)") } } ```

Members (0)

This type has no directly callable members in this snapshot. See the framework’s skipped declarations for unsupported APIs.

Skipped declarations

24 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

SRDataSensor.ambientLight

Static protocol requirements cannot be called through an instance.

SRDataSensor.visits

Static protocol requirements cannot be called through an instance.

SRDataSensor.deviceUsage

Static protocol requirements cannot be called through an instance.

SRDataSensor.messagesUsage

Static protocol requirements cannot be called through an instance.

SRDataSensor.phoneUsage

Static protocol requirements cannot be called through an instance.

SRDataSensor.onWristState

Static protocol requirements cannot be called through an instance.

SRDataSensor.keyboardMetrics

Static protocol requirements cannot be called through an instance.

SRDataSensor.siriSpeechMetrics

Static protocol requirements cannot be called through an instance.

SRDataSensor.telephonySpeechMetrics

Static protocol requirements cannot be called through an instance.

SRDataSensor.mediaEvents

Static protocol requirements cannot be called through an instance.

SRDataSensor.wristTemperature

Static protocol requirements cannot be called through an instance.

SRDataSensor.faceMetrics

Static protocol requirements cannot be called through an instance.

SRDataSensor.acousticSettings

Static protocol requirements cannot be called through an instance.

SRDataSensor.sleepSessions

Static protocol requirements cannot be called through an instance.

SRDataSensor.pedometerData

Static protocol requirements cannot be called through an instance.

SRDataSensor.heartRate

Static protocol requirements cannot be called through an instance.

SRDataSensor.odometer

Static protocol requirements cannot be called through an instance.

SRDataSensor.rotationRate

Static protocol requirements cannot be called through an instance.

SRDataSensor.accelerometer

Static protocol requirements cannot be called through an instance.

SRDataSensor.ambientPressure

Static protocol requirements cannot be called through an instance.

SRDataSensor.electrocardiogram

Static protocol requirements cannot be called through an instance.

SRDataSensor.photoplethysmogram

Static protocol requirements cannot be called through an instance.

SRDataSensor.headphoneMotion

Static protocol requirements cannot be called through an instance.

SRDataSensor.headphoneSettings

Static protocol requirements cannot be called through an instance.

All SensorKit types →