<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "WorkoutKit",
  "identifier" : "/documentation/WorkoutKit/WorkoutAlert/speed(_:unit:metric:)-1o2j",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "WorkoutKit"
    ],
    "preciseIdentifier" : "s:10WorkoutKit0A5AlertPA2A010SpeedRangeC0VRszrlE5speed_4unit6metricAESNySdG_So06NSUnitD0CAA0aC6MetricOtFZ"
  },
  "title" : "speed(_:unit:metric:)"
}
-->

# speed(_:unit:metric:)

Creates a new speed alert for the provided range.

```
static func speed(_ range: ClosedRange<Double>, unit: UnitSpeed, metric: WorkoutAlertMetric = .current) -> Self
```

## Parameters

`range`

A closed range of speed values.

`unit`

The speed units used by the range.

`metric`

The metric used for the speed measurements.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)