---
title: HKQuantitySeriesSampleBuilder
framework: healthkit
role: symbol
role_heading: Class
path: healthkit/hkquantityseriessamplebuilder
---

# HKQuantitySeriesSampleBuilder

A builder object for incrementally building a sample that contains multiple quantities.

## Declaration

```swift
class HKQuantitySeriesSampleBuilder
```

## Topics

### Creating a Quantity Series Builder

- [init(healthStore:quantityType:startDate:device:)](healthkit/hkquantityseriessamplebuilder/init(healthstore:quantitytype:startdate:device:).md)
- [quantityType](healthkit/hkquantityseriessamplebuilder/quantitytype.md)
- [startDate](healthkit/hkquantityseriessamplebuilder/startdate.md)
- [device](healthkit/hkquantityseriessamplebuilder/device.md)

### Adding Values

- [insert(_:at:)](healthkit/hkquantityseriessamplebuilder/insert(_:at:).md)
- [insert(_:for:)](healthkit/hkquantityseriessamplebuilder/insert(_:for:).md)

### Ending the Collection

- [discard()](healthkit/hkquantityseriessamplebuilder/discard().md)
- [finishSeries(metadata:completion:)](healthkit/hkquantityseriessamplebuilder/finishseries(metadata:completion:).md)
- [finishSeries(metadata:endDate:completion:)](healthkit/hkquantityseriessamplebuilder/finishseries(metadata:enddate:completion:).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)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Series data

- [HKHeartbeatSeriesBuilder](healthkit/hkheartbeatseriesbuilder.md)
- [HKHeartbeatSeriesSample](healthkit/hkheartbeatseriessample.md)
