Building an iOS/macOS music player is an, um, *interesting* exploration of a history of Apple frameworks:
- AVFoundation (iOS 2, macOS 10.7) on the Mac to play non-DRM tracks
- MediaPlayer (iOS 2, macOS 10.12) on iOS to access your library and play tracks
- iTunesLibrary (macOS 10.13) on the Mac to access your library
- MusicKit (iOS 15, macOS 12.0) to play DRM-protected tracks on macOS Sonoma, and on iOS to access Apple Music information that’s not exposed in MediaPlayer
Good to see MusicKit evolve into being a more capable replacement of the others, though it still has a couple of rough edges and relies heavily on MediaPlayer under the hood.