---
title: HKWorkoutSessionDelegate
framework: healthkit
role: symbol
role_heading: Protocol
path: healthkit/hkworkoutsessiondelegate
---

# HKWorkoutSessionDelegate

The session delegate protocol that defines an interface for receiving notifications about errors and changes in the workout session’s state.

## Declaration

```swift
protocol HKWorkoutSessionDelegate : NSObjectProtocol
```

## Mentioned in

Running workout sessions

## Overview

Overview All the methods are required. HealthKit calls these methods on an anonymous serial background queue.

## Topics

### Tracking workout sessions

- [workoutSession(_:didChangeTo:from:date:)](healthkit/hkworkoutsessiondelegate/workoutsession(_:didchangeto:from:date:).md)
- [workoutSession(_:didFailWithError:)](healthkit/hkworkoutsessiondelegate/workoutsession(_:didfailwitherror:).md)
- [workoutSession(_:didGenerate:)](healthkit/hkworkoutsessiondelegate/workoutsession(_:didgenerate:).md)
- [workoutSession(_:didBeginActivityWith:date:)](healthkit/hkworkoutsessiondelegate/workoutsession(_:didbeginactivitywith:date:).md)
- [workoutSession(_:didEndActivityWith:date:)](healthkit/hkworkoutsessiondelegate/workoutsession(_:didendactivitywith:date:).md)

### Working with mirrored sessions

- [workoutSession(_:didDisconnectFromRemoteDeviceWithError:)](healthkit/hkworkoutsessiondelegate/workoutsession(_:diddisconnectfromremotedevicewitherror:).md)
- [workoutSession(_:didReceiveDataFromRemoteWorkoutSession:)](healthkit/hkworkoutsessiondelegate/workoutsession(_:didreceivedatafromremoteworkoutsession:).md)

## Relationships

### Inherits From

- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Monitoring the session

- [delegate](healthkit/hkworkoutsession/delegate.md)
