Instance Property

duration

The workout’s duration.

Declaration

@property(readonly, assign) NSTimeInterval duration;

Discussion

A workout’s duration can be specified in one of three ways. The workoutWithActivityType:startDate:endDate: method uses the time interval between the provided start and end dates. The workoutWithActivityType:startDate:endDate:duration:totalEnergyBurned:totalDistance:metadata: method sets the duration to the provided value. And the workoutWithActivityType:startDate:endDate:workoutEvents:totalEnergyBurned:totalDistance:metadata: method calculates the total active duration based on the start and end dates and the workout events.

See Also

Getting Property Data

totalDistance

The total distance traveled during the workout.

totalEnergyBurned

The total active energy burned during the workout.

workoutActivityType

The type of activity performed during the workout.

workoutEvents

An array of workout event objects.

totalFlightsClimbed

The total number of flights of stairs climbed during the workout.

totalSwimmingStrokeCount

The total stroke count for the workout.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software