<!--
{
  "availability" : [
    "Xcode: 27.0.0 -",
    "iOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "article",
  "framework" : "HealthKit",
  "identifier" : "/documentation/HealthKit/tracking-heart-rate-zones-for-workouts",
  "metadataVersion" : "0.1.0",
  "role" : "sampleCode",
  "title" : "Tracking heart rate zones for workouts"
}
-->

# Tracking heart rate zones for workouts

Start a workout on iOS or watchOS and track and display heart rate zones.

## Overview

> Note: This sample code project is associated with WWDC26 session 207:
> [Deliver workout insights with HealthKit workout zones](https://developer.apple.com/wwdc26/207/).

## Configure the sample code project

To configure the sample code project:

1. Open the sample with the latest version of Xcode.
2. Set the developer team for all targets to let Xcode automatically manage the provisioning profile. For more information, see [Set the bundle ID](https://developer.apple.com/documentation/xcode/preparing-your-app-for-distribution#Set-the-bundle-ID) and [Assign the project to a team](https://developer.apple.com/documentation/xcode/preparing-your-app-for-distribution#Assign-the-project-to-a-team).
3. In the Info pane of the `HKWorkoutZoneSample Watch App` target, change the value of the `WKCompanionAppBundleIdentifier` key to the bundle ID of the iOS app.

---

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)