swiftship/internal/skills/data/tvos/gestures/SKILL.md
tvOS gesture patterns: Siri Remote input handling with onMoveCommand, onPlayPauseCommand, onExitCommand, swipe recognition. Use when implementing tvOS input handling, remote control interactions, or focus-based gestures. Triggers: gesture, Siri Remote, onMoveCommand, swipe, remote.
npx skillsauth add abdullah4ai/apple-dev-docs gesturesInstall 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 does NOT support touch gestures. All input comes from the Siri Remote.
DIRECTIONAL INPUT:
.onMoveCommand { direction in
switch direction {
case .up: moveUp()
case .down: moveDown()
case .left: moveLeft()
case .right: moveRight()
@unknown default: break
}
}
PLAY/PAUSE BUTTON:
.onPlayPauseCommand {
togglePlayback()
}
MENU/BACK BUTTON:
.onExitCommand {
dismiss()
}
SELECT (CLICK) BUTTON:
.onTapGesture only for non-button focusable viewsLONG PRESS:
.onLongPressGesture(minimumDuration: 0.5) {
showContextOptions()
}
.gesture(
DragGesture(minimumDistance: 50)
.onEnded { value in
if abs(value.translation.width) > abs(value.translation.height) {
if value.translation.width > 0 {
swipeRight()
} else {
swipeLeft()
}
}
}
)
onMoveCommand for directional navigation, not drag gesturesonExitCommand for back navigationtesting
Use for 3D games: racing, 3D sports, board games, marble maze, tower defense, bowling. SceneKit + SceneView architecture, 3D scene hierarchy, physics, game loop, primitives, materials, cameras, particles, audio.
documentation
Game UI patterns: SwiftUI HUD overlays on SpriteKit, menus (main/pause/game-over), virtual joystick/d-pad, score displays, health bars, tutorial onboarding.
tools
Download free game sprites/textures/3D models and generate procedural assets. Covers nw_download_asset tool, texture factories, sprite atlas organization, 3D model loading, and programmatic asset creation.
testing
Use for 2D games: arcade, puzzle, sports, ping pong, platformer, shooter, 2D racing. SpriteKit + SpriteView architecture, scene hierarchy, physics, game loop, audio, particles, game feel.