---
title: "startActivity(with:)"
framework: healthkit
role: symbol
role_heading: Instance Method
path: "healthkit/hkworkoutsession/startactivity(with:)"
---

# startActivity(with:)

Starts the workout session activity, and sets the start date.

## Declaration

```swift
func startActivity(with date: Date?)
```

## Parameters

- `date`: The start date for the workout session.

## See Also

### Related Documentation

- [HKWorkoutSessionState.running](healthkit/hkworkoutsessionstate/running.md)

### Managing the workout

- [prepare()](healthkit/hkworkoutsession/prepare().md)
- [pause()](healthkit/hkworkoutsession/pause().md)
- [resume()](healthkit/hkworkoutsession/resume().md)
- [stopActivity(with:)](healthkit/hkworkoutsession/stopactivity(with:).md)
- [end()](healthkit/hkworkoutsession/end().md)
