---
title: "hardware(headphones:)"
framework: relevancekit
role: symbol
role_heading: Type Method
path: "relevancekit/relevantcontext/hardware(headphones:)"
---

# hardware(headphones:)

Tells the system a widget is relevant when a person’s headphones are connected.

## Declaration

```swift
static func hardware(headphones: RelevantContext.HeadphonesCondition) -> RelevantContext
```

## Parameters

- `headphones`: A value that indicates connected headphones.

## Return Value

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

## Discussion

Discussion Setting a RelevantContext.HeadphonesCondition to signal relevance to the system doesn’t give you access to fitness activity and information. If contextual fitness information isn’t available to the system, fitness clues to signal relevance don’t have an effect. 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 Increasing the visibility of widgets in Smart Stacks.

## See Also

### Hardware clues

- [RelevantContext.HeadphonesCondition](relevancekit/relevantcontext/headphonescondition.md)
