<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SensorKit",
  "identifier" : "/documentation/SensorKit/SRReader",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "SensorKit"
    ],
    "preciseIdentifier" : "s:9SensorKit8SRReaderC"
  },
  "title" : "SRReader"
}
-->

# SRReader

`SRReader` serves as the primary interface for accessing sensor data from various device sensors.

```
final class SRReader<Sensor> where Sensor : SRDataSensor
```

## Topics

### Initializers

[`init(sensor: Sensor) throws`](/documentation/SensorKit/SRReader/init(sensor:))

Creates a new sensor reader for the specified sensor type.

### Instance Properties

[`var authorizationStatus: SRAuthorizationStatus`](/documentation/SensorKit/SRReader/authorizationStatus)

The current authorization status for accessing the sensor data.

[`var devices: [SRDevice]`](/documentation/SensorKit/SRReader/devices)

Returns device information for all devices that have stored data for
the given sensor in SensorKit

[`let sensor: Sensor`](/documentation/SensorKit/SRReader/sensor)

The sensor instance associated with this reader.

### Instance Methods

[`func deletionRecords(matching: SRFetchRequest) -> some AsyncSequence<SRFetchResponse<SRDeletionRecord>, any Error>`](/documentation/SensorKit/SRReader/deletionRecords(matching:))

Fetches sensor data based on the provided request parameters.
The reader must be authorized for the sensor for this to succeed.

[`func samples(matching: SRFetchRequest) -> some AsyncSequence<SRFetchResponse<Sensor.Sample>, any Error>`](/documentation/SensorKit/SRReader/samples(matching:))

Fetches sensor data based on the provided request parameters.
The reader must be authorized for the sensor for this to succeed.

[`func startRecording() async throws`](/documentation/SensorKit/SRReader/startRecording())

Starts recording sensor data.

[`func stopRecording() async throws`](/documentation/SensorKit/SRReader/stopRecording())

Stops recording sensor data.

## Relationships

### Conforms To

[`Copyable`](/documentation/Swift/Copyable)

[`Sendable`](/documentation/Swift/Sendable)

[`Observable`](/documentation/Observation/Observable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Escapable`](/documentation/Swift/Escapable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)