Collection

AVKit sample architecture

Source-backed, high-level architecture notes for Apple sample-code pages grouped in the AVKit folder.

  • Catalog module label: AVKit
  • Coverage: 6 / 6 sample pages documented
  • Source policy: archive hashes and extracted-tree references are verified locally before analysis

Samples

Sample Platforms High-level architecture Documented patterns
Adopting Picture in Picture Playback in tvOS iOS, iPadOS, Mac Catalyst, tvOS A menu controller selects one of two player strategies and centralizes dismissal/restoration callbacks. Strategy selection, Delegate, Custom player composition, Lifecycle retention, Value model
Creating a multiview video playback experience in visionOS visionOS A main-actor observable state model owns per-video models/controllers and reduces AVExperienceController transitions into SwiftUI state. Observable state model, Per-item model, Delegate state reduction, Transition group, SwiftUI-UIKit adapter
Playing immersive media with AVKit visionOS The app owns and environment-injects a main-actor player model that creates AVPlayerViewController and coordinates experience transitions. Environment-injected model, Playback facade, Delegate, Scene adapter, Value model
Playing video content in a standard user interface iOS, iPadOS, Mac Catalyst A screen-owned PlaybackController is the catalog-level façade; it retains one coordinator per video, and each coordinator manages one player-view-controller lifecycle. Coordinator, Registry, Delegate, OptionSet state model, Lazy resource lifecycle
Supporting Continuity Camera in your tvOS app tvOS The SwiftUI app is the composition root for one capture-session manager and three media-specific capturers; ContentView observes and commands them. Composition root, Observable service objects, Observer adapter, Framework delegate, Extension-based decomposition
Working with Overlays and Parental Controls in tvOS tvOS The menu owns a reusable playback screen; that screen owns and replaces the AVKit controller, player, overlay, pending item, and observations for each playback request. Screen-owned coordinator, Framework delegate, KVO observer, Metadata policy, Child view controller composition

Cross-sample signals

Recurring documented patterns

Pattern label Sample documents
Delegate 3
Value model 2
Framework delegate 2

Type-role naming evidence

Counts below are declaration-name suffixes, not inferred patterns.

Role suffix Distinct declarations across samples
Delegate 11
View 11
Controller 7
Observer 4
App 3
Model 3
Player 2
Provider 1
Coordinator 1
Manager 1

Swift access-control evidence

These are declaration occurrences in scanned Swift source, including implicit internal declarations.

Access level Occurrences
implicit internal 526
private 97
public 24
private(set) 8
fileprivate 1
internal 1

References

Generated from the verified local catalog and completed Markdown documents.