Contents

HKWorkoutActivity

An object that describes an activity within a longer workout.

Declaration

class HKWorkoutActivity

Mentioned in

Overview

Workout activity objects partition a workout into a set of separate activities. For example, you can use workout activities to record the swim, bike, and running portions of a multisport event, like a triathlon, or to represent the active and rest periods during interval training. All HKWorkout instance have at least one, associated HKWorkoutActivity. If you don’t explicitly set workout activities, HealthKit assigns a workout activity that matches the HKWorkout object’s activity type. For more information, see Dividing a HealthKit workout into activities.

Topics

Creating workout activities

Accessing workout data

Specifying predicate key paths

Initializers

See Also

Samples