<!--
{
  "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",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "WorkoutKit"
    ],
    "preciseIdentifier" : "s:10WorkoutKit0A5AlertP"
  },
  "title" : "WorkoutAlert"
}
-->

# WorkoutAlert

An alert that notifies the user of significant events during a workout.

```
protocol WorkoutAlert : Hashable, Sendable
```

## Topics

### Determining support

[`func supports(activity: HKWorkoutActivityType, location: HKWorkoutSessionLocationType) -> Bool`](/documentation/WorkoutKit/WorkoutAlert/supports(activity:location:))

Returns a Boolean value that indicates whether the alert supports the provided activity and location.

### Setting the alert metric

[`var metric: WorkoutAlertMetric`](/documentation/WorkoutKit/WorkoutAlert/metric)

The metric used to measure performance for the alert.

[`enum WorkoutAlertMetric`](/documentation/WorkoutKit/WorkoutAlertMetric)

A value that specifies the type of metric used to measure performance.

### Creating cadence alerts

[`static func cadence(ClosedRange<Double>, unit: UnitFrequency) -> Self`](/documentation/WorkoutKit/WorkoutAlert/cadence(_:unit:)-y8da)

Creates a new alert for a range of cadence values.

[`struct CadenceRangeAlert`](/documentation/WorkoutKit/CadenceRangeAlert)

An alert for a range of cadence values.

[`static func cadence(Double, unit: UnitFrequency) -> Self`](/documentation/WorkoutKit/WorkoutAlert/cadence(_:unit:)-3fnpg)

Creates an alert for the specified cadence threshold.

[`struct CadenceThresholdAlert`](/documentation/WorkoutKit/CadenceThresholdAlert)

An alert for a cadence threshold.

### Creating heart rate alerts

[`static func heartRate(ClosedRange<Double>, unit: UnitFrequency) -> Self`](/documentation/WorkoutKit/WorkoutAlert/heartRate(_:unit:))

Creates a new heart rate alert for the target range.

[`struct HeartRateRangeAlert`](/documentation/WorkoutKit/HeartRateRangeAlert)

An alert for a range of heart rates.

[`static func heartRate(zone: Int) -> Self`](/documentation/WorkoutKit/WorkoutAlert/heartRate(zone:))

Creates a new alert for the specified heart rate zone.

[`struct HeartRateZoneAlert`](/documentation/WorkoutKit/HeartRateZoneAlert)

An alert for a heart rate zone.

### Creating power alerts

[`static func power(ClosedRange<Double>, unit: UnitPower) -> Self`](/documentation/WorkoutKit/WorkoutAlert/power(_:unit:)-57ekz)

Creates a new power alert for the target range.

[`struct PowerRangeAlert`](/documentation/WorkoutKit/PowerRangeAlert)

An alert for a range of power values.

[`static func power(Double, unit: UnitPower) -> Self`](/documentation/WorkoutKit/WorkoutAlert/power(_:unit:)-289mz)

Creates an alert for the specified power threshold.

[`struct PowerThresholdAlert`](/documentation/WorkoutKit/PowerThresholdAlert)

An alert for a power threshold.

[`static func power(zone: Int) -> Self`](/documentation/WorkoutKit/WorkoutAlert/power(zone:))

Creates a new alert for the specified power zone.

[`struct PowerZoneAlert`](/documentation/WorkoutKit/PowerZoneAlert)

An alert for a power zone.

### Creating speed alerts

[`static func speed(ClosedRange<Double>, unit: UnitSpeed, metric: WorkoutAlertMetric) -> Self`](/documentation/WorkoutKit/WorkoutAlert/speed(_:unit:metric:)-1o2j)

Creates a new speed alert for the provided range.

[`struct SpeedRangeAlert`](/documentation/WorkoutKit/SpeedRangeAlert)

An alert for a range of speed values.

[`static func speed(Double, unit: UnitSpeed, metric: WorkoutAlertMetric) -> Self`](/documentation/WorkoutKit/WorkoutAlert/speed(_:unit:metric:)-4zald)

Creates a new speed threshold alert.

[`struct SpeedThresholdAlert`](/documentation/WorkoutKit/SpeedThresholdAlert)

An alert for a speed threshold.

### Type Methods

[`static func power(Double, unit: UnitPower, metric: WorkoutAlertMetric) -> Self`](/documentation/WorkoutKit/WorkoutAlert/power(_:unit:metric:)-2847m)

[`static func power(ClosedRange<Double>, unit: UnitPower, metric: WorkoutAlertMetric) -> Self`](/documentation/WorkoutKit/WorkoutAlert/power(_:unit:metric:)-5c94p)

## Relationships

### Inherits From

[`Equatable`](/documentation/Swift/Equatable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Hashable`](/documentation/Swift/Hashable)

[`Sendable`](/documentation/Swift/Sendable)

### Conforming Types

[`HeartRateZoneAlert`](/documentation/WorkoutKit/HeartRateZoneAlert)

[`HeartRateRangeAlert`](/documentation/WorkoutKit/HeartRateRangeAlert)

[`CadenceRangeAlert`](/documentation/WorkoutKit/CadenceRangeAlert)

[`SpeedThresholdAlert`](/documentation/WorkoutKit/SpeedThresholdAlert)

[`PowerThresholdAlert`](/documentation/WorkoutKit/PowerThresholdAlert)

[`PowerZoneAlert`](/documentation/WorkoutKit/PowerZoneAlert)

[`SpeedRangeAlert`](/documentation/WorkoutKit/SpeedRangeAlert)

[`CadenceThresholdAlert`](/documentation/WorkoutKit/CadenceThresholdAlert)

[`PowerRangeAlert`](/documentation/WorkoutKit/PowerRangeAlert)

---

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)