<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 4.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "HealthKit",
  "identifier" : "/documentation/HealthKit/HKWorkoutRouteBuilder/init(healthStore:device:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "HealthKit"
    ],
    "preciseIdentifier" : "c:objc(cs)HKWorkoutRouteBuilder(im)initWithHealthStore:device:"
  },
  "title" : "init(healthStore:device:)"
}
-->

# init(healthStore:device:)

Creates and returns a new workout route builder.

```
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

A newly initialized workout route builder.

## Discussion

### Discussion

Use of this initializer is discouraged. Use [`seriesBuilder(for:)`](/documentation/HealthKit/HKWorkoutBuilder/seriesBuilder(for:)) instead.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)