---
title: "init(healthStore:device:)"
framework: healthkit
role: symbol
role_heading: Initializer
path: "healthkit/hkworkoutroutebuilder/init(healthstore:device:)"
---

# init(healthStore:device:)

Creates and returns a new workout route builder.

## Declaration

```swift
init(healthStore: HKHealthStore, device: HKDevice?)
```

## Parameters

- `healthStore`: The HealthKit store.
- `device`: An object representing the device that provided the location data. Pass nil if the app is generating its own location data (for example, using doc://com.apple.documentation/documentation/CoreLocation).

## Return Value

Return Value A newly initialized workout route builder.

## Discussion

Discussion Use of this initializer is discouraged. Use seriesBuilder(for:) instead.

## See Also

### Creating the builder

- [seriesBuilder(for:)](healthkit/hkworkoutbuilder/seriesbuilder(for:).md)
