
Relevancekit
Increase widget visibility on Apple Watch using RelevanceKit.
Install
npx skills add dpearson2699/swift-ios-skills --skill relevancekit -g -a claude-code -y- Repository
- dpearson2699/swift-ios-skills1.3k
- Category
- Engineering
- Updated
- 3mo ago
- License
- See repository
- Context cost
- Mediumabout 3,000 tokens
- Runs scripts
- No, instructions only
What it does
Increase widget visibility on Apple Watch using RelevanceKit. Use when providing contextual relevance signals for watchOS widgets, declaring time-based or location-based relevance, combining multiple relevance providers, helping the system surface the right widget at the right time on watchOS 26, or routing mixed RelevanceKit/WidgetKit/HealthKit/MapKit Smart Stack scope.
RelevanceKit
Provide on-device contextual clues that increase a widget's visibility in the Apple Watch Smart Stack. RelevanceKit tells the system when a widget is relevant by time, location, fitness state, sleep schedule, or connected hardware. Targets Swift 6.3 / watchOS 26+.
Beta-sensitive. Re-check Apple documentation before making strong RelevanceKit availability or behavior claims.
See references/relevancekit-patterns.md for complete relevant-widget, timeline provider, grouping, preview, and permission patterns.
Contents
- Overview
- Setup
- Relevance Providers
- Boundary Routing
- Time-Based Relevance
- Location-Based Relevance
- Fitness and Sleep Relevance
- Hardware Relevance
- Combining Signals
- Widget Integration
- Common Mistakes
- Review Checklist
- References
Overview
watchOS uses two mechanisms to determine widget relevance in the Smart Stack:
- Timeline provider relevance -- implement
relevance()on an existingAppIntentTimelineProviderto attachRelevantContextclues to timeline entries. Available across platforms; only watchOS acts on the data. - Relevant widget -- use
RelevanceConfigurationwith aRelevanceEntriesProviderto build a widget driven entirely by relevance clues. The system creates individual Smart Stack cards per relevant entry. watchOS 26+ only.
Choose a timeline provider when the widget always has data to show and relevance is supplementary. Choose a relevant widget when the widget should only appear when conditions match, or when multiple cards should appear simultaneously (e.g., several upcoming calendar events).
