Protocol

HKWorkoutSessionDelegate

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

Declaration

@protocol HKWorkoutSessionDelegate

Overview

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

Topics

Tracking Workout Sessions

- workoutSession:didChangeToState:fromState:date:

Tells the delegate that the session’s state has changed.

Required.

- workoutSession:didFailWithError:

Tells the delegate that the session has failed with an error.

Required.

- workoutSession:didGenerateEvent:

Tells the delegate that the system has generated a workout event.

Relationships

Inherits From

See Also

Monitoring the Session

delegate

The workout session’s delegate.