<!--
{
  "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/HKWorkoutRoute",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "HealthKit"
    ],
    "preciseIdentifier" : "c:objc(cs)HKWorkoutRoute"
  },
  "title" : "HKWorkoutRoute"
}
-->

# HKWorkoutRoute

A sample that contains a workout’s route data.

```
class HKWorkoutRoute
```

## Overview

When creating a workout route, you do not instantiate the [`HKWorkoutRoute`](/documentation/HealthKit/HKWorkoutRoute) objects directly. Instead, create a [`HKWorkoutRouteBuilder`](/documentation/HealthKit/HKWorkoutRouteBuilder) object, and provide it with location data throughout the workout. After the workout ends, call the route builder’s  [`finishRoute(with:metadata:completion:)`](/documentation/HealthKit/HKWorkoutRouteBuilder/finishRoute(with:metadata:completion:)) method to create the route. For detailed instructions, see <doc://com.apple.healthkit/documentation/HealthKit/creating-a-workout-route>.

The route’s location data is stored as an array of <doc://com.apple.documentation/documentation/CoreLocation/CLLocation> objects. Because the route may contain a large number of location objects, use a [`HKWorkoutRouteQuery`](/documentation/HealthKit/HKWorkoutRouteQuery) object to asynchronously read the location data from the HealthKit store in batches. For more information, see <doc://com.apple.healthkit/documentation/HealthKit/reading-route-data>.

### Using workout routes

As with many HealthKit classes, don’t subclass the [`HKWorkoutRoute`](/documentation/HealthKit/HKWorkoutRoute) class. You can extend [`HKWorkoutRoute`](/documentation/HealthKit/HKWorkoutRoute) objects by adding custom metadata keys and values to the metadata dictionary when the object is created.

---

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)