<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RelevanceKit",
  "identifier" : "/documentation/RelevanceKit/RelevantContext/fitness(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "RelevanceKit"
    ],
    "preciseIdentifier" : "s:12RelevanceKit15RelevantContextV7fitnessyA2C16FitnessConditionVFZ"
  },
  "title" : "fitness(_:)"
}
-->

# fitness(_:)

Tells the system a widget is relevant because of a person’s fitness activity.

```
static func fitness(_ condition: RelevantContext.FitnessCondition) -> RelevantContext
```

## Parameters

`condition`

A value that describes whether a person is working out or has incomplete activity rings.

## Return Value

A contextual clue the system uses to determine the relevance of a widget in the Smart Stack on Apple Watch.

## Discussion

To indicate relevance based on a fitness condition, request permission to access HealthKit data:

- The [`workoutActive`](/documentation/RelevanceKit/RelevantContext/FitnessCondition/workoutActive) condition requires usage of <doc://com.apple.documentation/documentation/HealthKit/HKWorkoutType>
- The [`activityRingsIncomplete`](/documentation/RelevanceKit/RelevantContext/FitnessCondition/activityRingsIncomplete) condition requires usage of
  <doc://com.apple.documentation/documentation/HealthKit/HKQuantityTypeIdentifier/appleExerciseTime>,
  <doc://com.apple.documentation/documentation/HealthKit/HKQuantityTypeIdentifier/appleMoveTime>, and
  <doc://com.apple.documentation/documentation/HealthKit/HKQuantityTypeIdentifier/appleStandTime>.

If contextual fitness information isn’t available to the system, fitness clues to signal relevance don’t have an effect.
For more information about requesting HealthKit permissions, refer to
<doc://com.apple.documentation/documentation/HealthKit/authorizing-access-to-health-data>.

> Note: Smart Stacks are available in iOS, iPadOS, and watchOS. However, functionality provided by RelevanceKit API is only available
> in watchOS. Calling its API on other platforms doesn’t have any effect.
> For more information, refer to <doc://com.apple.documentation/documentation/WidgetKit/Widget-Suggestions-In-Smart-Stacks>.

---

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)