swiftship/internal/skills/data/watchos/widgets/SKILL.md
watchOS complications: WidgetKit complication families, accessory sizes, timeline providers for watch face. Use when implementing watchOS-specific patterns related to widgets.
npx skillsauth add abdullah4ai/apple-dev-docs widgetsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
WATCH COMPLICATIONS (WidgetKit):
COMPLICATION FAMILIES:
| Family | Shape | Use Case |
|--------|-------|----------|
| .accessoryCircular | Small circle | Single metric, icon + value |
| .accessoryRectangular | Rectangle | Multi-line text, small chart |
| .accessoryInline | Single line text | Short status text on watch face |
| .accessoryCorner | Corner gauge | Gauge with label |
TIMELINE PROVIDER:
struct ComplicationProvider: TimelineProvider {
func placeholder(in context: Context) -> ComplicationEntry {
ComplicationEntry(date: .now, value: 0, label: "—")
}
func getSnapshot(in context: Context, completion: @escaping (ComplicationEntry) -> Void) {
completion(ComplicationEntry(date: .now, value: 42, label: "Steps"))
}
func getTimeline(in context: Context, completion: @escaping (Timeline<ComplicationEntry>) -> Void) {
let entry = ComplicationEntry(date: .now, value: 42, label: "Steps")
let timeline = Timeline(entries: [entry], policy: .after(.now.addingTimeInterval(900)))
completion(timeline)
}
}
struct ComplicationEntry: TimelineEntry {
let date: Date
let value: Int
let label: String
}
COMPLICATION VIEWS:
struct ComplicationView: View {
var entry: ComplicationProvider.Entry
@Environment(\.widgetFamily) var family
var body: some View {
switch family {
case .accessoryCircular:
Gauge(value: Double(entry.value), in: 0...100) {
Text(entry.label)
}
.gaugeStyle(.accessoryCircularCapacity)
case .accessoryRectangular:
VStack(alignment: .leading) {
Text(entry.label)
.font(AppTheme.Fonts.headline)
.widgetAccentable()
Text("\(entry.value)")
.font(AppTheme.Fonts.title2)
}
case .accessoryInline:
Text("\(entry.label): \(entry.value)")
case .accessoryCorner:
Text("\(entry.value)")
.widgetLabel {
Text(entry.label)
}
default:
Text(entry.label)
}
}
}
WIDGET DEFINITION:
struct MyComplication: Widget {
let kind: String = "MyComplication"
var body: some WidgetConfiguration {
StaticConfiguration(kind: kind, provider: ComplicationProvider()) { entry in
ComplicationView(entry: entry)
.containerBackground(.fill.tertiary, for: .widget)
}
.configurationDisplayName("My Complication")
.description("Shows current status on watch face")
.supportedFamilies([
.accessoryCircular,
.accessoryRectangular,
.accessoryInline,
.accessoryCorner
])
}
}
WIDGET BUNDLE:
@main
struct MyWidgetBundle: WidgetBundle {
var body: some Widget {
MyComplication()
}
}
CRITICAL RULES:
.containerBackground(.fill.tertiary, for: .widget) is REQUIRED.widgetAccentable() on elements that should tint with the watch face color.accessoryCircular for the most common single-value complicationShared/ directorystatic let for Swift 6 concurrencytools
Apple platform skill for docs, WWDC lookup, App Store Connect work, and SwiftUI app generation. Use repo-local `node cli.js` for Apple docs and WWDC search, `appledev store` for App Store Connect workflows, and `appledev build` for app scaffolding or fix loops on macOS. USE WHEN: Apple APIs, WWDC sessions, TestFlight/App Store tasks, or building/fixing Apple-platform apps. DON'T USE WHEN: non-Apple platforms, generic backend work, or general web research. EDGE CASES: docs-only queries use `node cli.js` in this repo, not `appledev`; release workflows use `appledev store`; app scaffolding uses `appledev build`; rules-only requests can read `references/ios-rules/` or `references/swiftui-guides/` progressively without invoking binaries.
tools
All-in-one Apple developer skill with three integrated tools shipped as a single unified binary. (1) Documentation search across Apple frameworks, symbols, and 1,267 WWDC sessions from 2014-2025. No credentials needed. (2) App Store Connect CLI with 120+ commands covering builds (find/wait/upload), TestFlight, pre-submission validate, submissions, signing, subscriptions (family-sharable), IAP, analytics, Xcode Cloud, metadata workflows, release pipeline dashboard, insights, win-back offers, promoted purchases, product pages, nominations, accessibility declarations, pre-orders, pricing filters, localizations update, diff, webhooks with local receiver, workflow automation, and more. Requires App Store Connect API key. (3) Multi-platform app builder (iOS/watchOS/tvOS/iPad/macOS/visionOS) that generates complete Swift/SwiftUI apps from natural language with auto-fix, simulator launch, interactive chat mode, and open-in-Xcode. Requires an LLM API key and Xcode. Includes 38 iOS development rules and 12 SwiftUI best practice guides for Liquid Glass, navigation, state management, and modern APIs. All three tools ship as one binary (appledev). USE WHEN: Apple API docs, App Store Connect management, WWDC lookup, or building iOS/watchOS/tvOS/macOS/visionOS apps from scratch. DON'T USE WHEN: non-Apple platforms or general coding.
development
watchOS haptic feedback: WKInterfaceDevice preset haptic types for wrist-based feedback. Use when implementing watchOS-specific patterns related to haptics.
testing
watchOS gesture patterns: Digital Crown, long press, swipe-to-dismiss, tap, watch-appropriate interactions. Use when implementing watchOS-specific patterns related to gestures.