Type Method


Returns the shared HKWorkoutType object.


class func workoutType() -> HKWorkoutType

Return Value

The shared HKWorkoutType instance.


This method returns an instance of the HKWorkoutType concrete subclass. HealthKit uses workout types to create samples that store information about individual workouts. Use workout type instances to create workout objects that you can save in the HealthKit store. For more information, see HKWorkoutType.

In HealthKit, all workouts use the same workout type.