currentActivity
The current workout activity.
Declaration
@NSCopying var currentActivity: HKWorkoutActivity { get }Discussion
This property contains a workout activity that’s currently in progress (an activity with an endDate property set to nil). If you end the activity — for example, by calling endCurrentActivity(on:) or updateActivity(uuid:end:completion:) — the system sets this property to nil until you begin a new activity.