AVKit, AVFoundation, playback, streaming, and media sessions
Start media playback with the highest-level system surface that satisfies the product. AVKit supplies standard playback UI while AVFoundation owns detailed assets, timing, capture, composition, and transport.
Design the capability
- Keep player state explicit: idle, preparing, ready, playing, paused, interrupted, stalled, failed, and ended.
- Persist resumable position by stable media identity and reconcile it with asset duration and server progress.
- Configure audio session and remote commands around user intent, interruptions, route changes, and background policy.
- Use supported streaming formats, subtitles, accessibility tracks, and Picture in Picture before creating custom controls.
Validation boundary
No media asset, stream, audio route, interruption, remote command, or Picture in Picture flow was executed.
Series navigation
- Previous: Part 93: tvOS focus, remote input, shelves, and navigation
- Next: Part 95: visionOS windows, volumes, ornaments, and spatial input
- Series index: Zero to iOS Hero