This gives Claude the reference patterns for building media playback UIs with AVKit, the standard framework for video players on iOS. You'd reach for this when implementing video playback, whether that's a full-screen player with AVPlayerViewController, an inline SwiftUI VideoPlayer, or Picture-in-Picture support. The skill covers the setup most developers miss (audio session configuration and background modes), shows both UIKit and SwiftUI approaches, and includes the delegate callbacks needed for PiP restore flows. It's opinionated about not subclassing AVPlayerViewController and emphasizes checking isReadyForDisplay to avoid the black flash on load. The custom PiP controller patterns are useful if you're building non-standard playback UIs that still need system-level PiP integration.

skills.sh installs
3.4K
GitHub stars
1.3K
last updated
Aug 21, 2026

Install

$ npx -y skills add dpearson2699/swift-ios-skills --skill avkit --agent claude-code

Installs into .claude/skills of the current project.

Files

AVKit

High-level media playback UI built on AVFoundation. Provides system-standard video players, Picture-in-Picture, AirPlay routing, transport controls, and subtitle/caption display. Targets Swift 6.3 / iOS 26+.

Contents

Setup

Audio Session Configuration

Playback apps need an audio session category and the matching background mode when they support background audio, AirPlay, or PiP.

  1. Enable Background Modes > Audio, AirPlay, and Picture in Picture (the audio value in UIBackgroundModes)
  2. Set the audio session category to .playback
  3. Defer setActive(true) until playback begins so you do not interrupt other audio prematurely
import AVFoundation

Sponsors

Details

Repository
github.com/dpearson2699/swift-ios-skills
Category
Mobile Development
First seen
May 16, 2026

More from dpearson2699/swift-ios-skills

All 98
1dpearson2699 avatarspritekitdpearson2699/swift-ios-skillsBuild 2D games and animations using SpriteKit. Use when creating game scenes with SKScene and SKView, adding sprites with SKSpriteNode, animating with SKAction 3.3Kskills.sh installs
2dpearson2699 avatarpdfkitdpearson2699/swift-ios-skillsDisplay and manipulate PDF documents using PDFKit. Use when embedding PDFView to show PDF files, creating or modifying PDFDocument instances, adding annotations3.3Kskills.sh installs
3vercel-labs avatarreact-nativevercel-labs/json-renderReact Native renderer for json-render that turns JSON specs into native mobile UIs. Use when working with @json-render/react-native, building React Native UIs f3.3Kskills.sh installs
4dpearson2699 avatarscenekitdpearson2699/swift-ios-skillsMaintain and extend existing SceneKit 3D scenes and visualizations. Use when working with SCNView, SCNScene, SCNNode scene graphs, SceneKit geometry/materials/l3.2Kskills.sh installs
5web-infra-dev avatarios-device-automationweb-infra-dev/midscene-skillsVision-driven iOS device automation using Midscene CLI. Operates entirely from screenshots — no DOM or accessibility labels required. Can interact with all visi3.2Kskills.sh installs
6dpearson2699 avatarappmigrationkitdpearson2699/swift-ios-skillsTransfer app data to or from other platforms using AppMigrationKit. Use when implementing system-orchestrated one-time migration between iOS and Android or anot3.2Kskills.sh installs