<!--
{
  "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/CustomWorkout/supportsAlert(_:activity:location:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "WorkoutKit"
    ],
    "preciseIdentifier" : "s:10WorkoutKit06CustomA0V13supportsAlert_8activity8locationSbAA0aE0_p_So21HKWorkoutActivityTypeVSo0h15SessionLocationJ0VtFZ"
  },
  "title" : "supportsAlert(_:activity:location:)"
}
-->

# supportsAlert(_:activity:location:)

Returns a Boolean value that indicates whether the system supports the specified alert for the given activity type and location.

```
static func supportsAlert(_ alert: any WorkoutAlert, activity: HKWorkoutActivityType, location: HKWorkoutSessionLocationType = .unknown) -> Bool
```

## Parameters

`alert`

The alert to check.

`activity`

The workout activity.

`location`

The workout location.

---

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)