---
title: SRDeletionRecord
framework: sensorkit
role: symbol
role_heading: Class
path: sensorkit/srdeletionrecord
---

# SRDeletionRecord

An object that describes the reason the framework deletes samples.

## Declaration

```swift
class SRDeletionRecord
```

## Overview

Overview When there are gaps in a recorded sensor’s data, deletion records account for the occasions when the framework deliberately removes the records. A deletion record specifies the time range when records are unavailable (see startTime and endTime), and the reason for removal. To access deletion records for a particular sensor, create a new reader by applying the sr_sensorForDeletionRecordsFromSensor() extension of NSString to the source sensor. let deletionRecordsReader = SRSensorReader(sensor: ambientLightSensor.rawValue.sr_sensorForDeletionRecordsFromSensor()) deletionRecordsReader.delegate = myAmbientLightDeletionRecordsDelegate

## Topics

### Accessing the Deletion Reason

- [reason](sensorkit/srdeletionrecord/reason.md)
- [SRDeletionReason](sensorkit/srdeletionreason.md)

### Accessing the Deletion Time

- [startTime](sensorkit/srdeletionrecord/starttime.md)
- [endTime](sensorkit/srdeletionrecord/endtime.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
