swiftship/internal/skills/data/always-tvos/components/SKILL.md
tvOS UI components: card buttons, focus states, media tiles, text entry, progress indicators. Use when working on tvOS component patterns, focus styling, or card-based UI. Triggers: Button, card, focus, CardButtonStyle, component, tile.
npx skillsauth add abdullah4ai/apple-developer-toolkit componentsInstall 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.
tvOS defaults to dark appearance. Design for a 10-foot viewing distance on large screens.
Color rules for tvOS:
.background / .secondarySystemBackground) when possible"Show, don't tell":
CARD BUTTON (primary tvOS pattern):
Button {
select(item)
} label: {
VStack(alignment: .leading, spacing: AppTheme.Spacing.sm) {
Image(item.thumbnail)
.resizable()
.aspectRatio(16/9, contentMode: .fill)
.frame(width: 300, height: 170)
.clipped()
.clipShape(.rect(cornerRadius: AppTheme.Style.cornerRadius))
Text(item.title)
.font(AppTheme.Fonts.callout)
.lineLimit(2)
}
}
.buttonStyle(.card)
PLAIN BUTTON:
Button("Play", systemImage: "play.fill") {
play()
}
.buttonStyle(.borderedProminent)
BUTTON HIERARCHY:
| Level | Style | Use Case |
|-------|-------|----------|
| Primary card | .buttonStyle(.card) | Media tiles, browsable items |
| Primary action | .borderedProminent | Play, Subscribe, Buy |
| Secondary | .bordered | More Info, Add to List |
| Destructive | .borderedProminent + .tint(.red) | Delete, Remove |
tvOS highlights focused elements with a lift/shadow effect. Focus is the primary interaction model:
struct FocusableCard: View {
@Environment(\.isFocused) var isFocused
var body: some View {
VStack {
Image(item.image)
.resizable()
.aspectRatio(16/9, contentMode: .fill)
Text(item.title)
.font(AppTheme.Fonts.callout)
}
.scaleEffect(isFocused ? 1.05 : 1.0)
.animation(.easeInOut(duration: 0.2), value: isFocused)
}
}
For custom focus effects:
.focusable()
.onFocusChange { focused in
withAnimation(.easeInOut(duration: 0.15)) {
isFocused = focused
}
}
tvOS requires generous spacing since users sit far from the screen:
| Element | Recommended | |---------|-------------| | Between sections | 60pt | | Between cards | 40pt | | Horizontal content padding | 80pt | | Minimum focusable element | 150x100pt |
tvOS uses a system keyboard — text input is limited:
@State private var searchText = ""
TextField("Search", text: $searchText)
.textFieldStyle(.plain)
Prefer selection over free-text input:
Picker("Category", selection: $category) {
ForEach(categories) { cat in
Text(cat.name).tag(cat)
}
}
// Indeterminate
ProgressView("Loading...")
// Overlay loading
ZStack {
ContentView()
if isLoading {
ProgressView()
.scaleEffect(1.5)
}
}
List {
Section("Settings") {
NavigationLink("Account") {
AccountView()
}
Toggle("Notifications", isOn: $notifications)
Picker("Quality", selection: $quality) {
Text("Auto").tag(Quality.auto)
Text("High").tag(Quality.high)
Text("Low").tag(Quality.low)
}
}
}
ContentUnavailableView(
"No Results",
systemImage: "magnifyingglass",
description: Text("Try a different search term")
)
.textFieldStyle(.roundedBorder) — tvOS text fields are plain.contextMenu — use focused button actions.popover.buttonStyle(.card) for browsable media content.borderedProminent per visible screen area@Environment(\.isFocused) for custom focus effectstools
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.
testing
watchOS complications: WidgetKit complication families, accessory sizes, timeline providers for watch face. Use when implementing watchOS-specific patterns related to widgets.
development
watchOS haptic feedback: WKInterfaceDevice preset haptic types for wrist-based feedback. Use when implementing watchOS-specific patterns related to haptics.