---
title: SRFetchResponse
framework: SensorKit
role: symbol
role_heading: Structure
platforms: [iOS 27.0+, iPadOS 27.0+, Mac Catalyst 27.0+]
path: sensorkit/srfetchresponse
---

# SRFetchResponse

A generic container that holds sensor data samples retrieved from SensorKit data streams.

## Declaration

```swift
struct SRFetchResponse<Sample>
```

## Overview

Overview SRFetchResponse is a type-safe container that wraps individual sensor data samples. It serves as the primary data delivery mechanism for sensor information retrieved through SRReader.fetch(_:) operations. Usage Example let request = SRFetchRequest() for try await response in reader.fetch(request) {     // Extract the sensor sample     switch response.sample {     case .success(let sample):         print("Sample data: \(sample)")     case .failure(let error):         print("Failed to decode sample: \(error)")     }

// Get the timestamp when data was recorded     let timestamp = response.timestamp()     print("Recorded at: \(Date(timeIntervalSinceReferenceDate: timestamp))") }

## Topics

### Instance Properties

- [sample](sensorkit/srfetchresponse/sample.md)
- [sourceDevice](sensorkit/srfetchresponse/sourcedevice.md)
- [timestamp](sensorkit/srfetchresponse/timestamp.md)

## Relationships

### Conforms To

- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
