Contents

fitness(_:)

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

Declaration

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:

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 Authorizing access to health data.

See Also

Fitness clues