---
title: "init(target:metric:)"
framework: workoutkit
role: symbol
role_heading: Initializer
path: "workoutkit/speedthresholdalert/init(target:metric:)"
---

# init(target:metric:)

Creates a new speed threshold alert.

## Declaration

```swift
init(target: Measurement<UnitSpeed>, metric: WorkoutAlertMetric)
```

## Parameters

- `target`: A speed measurement that represents the target threshold.
- `metric`: The metric used to measure the speed.
