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-codeInstalls 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
- AVPlayerViewController
- SwiftUI VideoPlayer
- Picture-in-Picture
- AirPlay
- Transport Controls and Playback Speed
- Subtitles and Closed Captions
- Common Mistakes
- Review Checklist
- References
Setup
Audio Session Configuration
Playback apps need an audio session category and the matching background mode when they support background audio, AirPlay, or PiP.
- Enable Background Modes > Audio, AirPlay, and Picture in Picture (the
audiovalue inUIBackgroundModes) - Set the audio session category to
.playback - 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- Spritekit3.3K
- Cryptokit3.3K
- Metrickit3.3K
- Pdfkit3.3K
- Gamekit3.3K
- Eventkit3.3K
- Musickit3.3K
- Swift Architecture3.3K
- Pencilkit3.3K
- Carplay3.2K
- Ios Simulator3.2K
- Scenekit3.2K
- Homekit3.2K
- Accessorysetupkit3.2K
- Callkit3.2K
- Cryptotokenkit3.2K
- Financekit3.2K
- Adattributionkit3.2K
- Paperkit3.2K
- Passkit3.2K
- Audioaccessorykit3.2K
- Dockkit3.2K
- Browserenginekit3.2K
- Appmigrationkit3.2K
