---
title: "init(healthStore:quantityType:startDate:device:)"
framework: healthkit
role: symbol
role_heading: Initializer
path: "healthkit/hkquantityseriessamplebuilder/init(healthstore:quantitytype:startdate:device:)"
---

# init(healthStore:quantityType:startDate:device:)

Creates a new quantity series builder.

## Declaration

```swift
init(healthStore: HKHealthStore, quantityType: HKQuantityType, startDate: Date, device: HKDevice?)
```

## Parameters

- `healthStore`: The HealthKit store.
- `quantityType`: The sample’s quantity type.
- `startDate`: The sample’s start date.
- `device`: An object representing the device that provided the data. Pass nil if the app is generating its own data.

## See Also

### Creating a Quantity Series Builder

- [quantityType](healthkit/hkquantityseriessamplebuilder/quantitytype.md)
- [startDate](healthkit/hkquantityseriessamplebuilder/startdate.md)
- [device](healthkit/hkquantityseriessamplebuilder/device.md)
