Developer guide for AVKit media playback covering AVPlayerViewController, SwiftUI VideoPlayer, Picture-in-Picture, AirPlay, and captions.
- skills.sh installs
- 3.4K
- GitHub stars
- 1.3K
- last updated
- Aug 21, 2026
What it does
- Covers audio session setup, AVPlayerViewController presentation and inline embedding, SwiftUI VideoPlayer, and Picture-in-Picture behavior
- Includes code patterns for full-screen and child-view-controller playback, delegate restore callbacks, and a referenced patterns file
- Enforces a
.playbackaudio session category and Background Modes configuration before Picture-in-Picture will work - Designed for iOS developers adding system-standard video playback to UIKit or SwiftUI apps targeting iOS 26 and later
Install
$ npx -y skills add dpearson2699/swift-ios-skills --skill avkit -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
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
Details
- Repository
- github.com/dpearson2699/swift-ios-skills
- Categories
- Mobile Apps, Frontend & UI Code
- First seen
- May 16, 2026
More from dpearson2699/swift-ios-skills
All 94- Spritekit3.4K
- Cryptokit3.4K
- Metrickit3.4K
- Pdfkit3.4K
- Gamekit3.4K
- Swift Architecture3.4K
- Eventkit3.4K
- Musickit3.3K
- Pencilkit3.3K
- Ios Simulator3.3K
- Carplay3.3K
- Scenekit3.3K
- Accessorysetupkit3.3K
- Homekit3.3K
- Callkit3.3K
- Cryptotokenkit3.3K
- Financekit3.3K
- Paperkit3.3K
- Adattributionkit3.3K
- Passkit3.3K
- Audioaccessorykit3.3K
- Dockkit3.3K
- Swift Security3.3K
- Browserenginekit3.2K
Similar to Avkit
More Mobile Apps
shareplay-activitiesdpearson2699/swift-ios-skills3.7K installsShared real-time experiences over FaceTime, Messages, AirDrop, and visionOS using GroupActivities and SharePlay.
musickitdpearson2699/swift-ios-skills3.3K installsLead-in: Integration guide for Apple Music playback, catalog search, and Now Playing metadata in iOS apps.
axiom-mediacharleswiltgen/axiom1.4K installsMedia-handling reference for camera, photo library, audio, haptics, ShazamKit, Now Playing, and CarPlay on Apple platforms.
watchOSrshankras/claude-code-apple-skills610 installsComprehensive watchOS guidance covering SwiftUI layouts, Watch Connectivity, complications, accessibility, and HealthKit workouts.
