The workout’s duration.
- iOS 8.0+
- Mac Catalyst 13.0+
- watchOS 2.0+
A workout’s duration can be specified in one of three ways. The
init(activity method uses the time interval between the provided start and end dates. The
init(activity method sets the duration to the provided value. And the
init(activity method calculates the total active duration based on the start and end dates and the workout events.