All of the threads on this topic are really old (5+ yo), and I can't seem to form a clear MODERN approach, so hopefully this can be summarized for 2020 (Swift 5, Xcode 11).
If you were to build an AUDIO (not just music) player app for the iPhone with iOS 13 in a way that is forward thinking (don't care about anything that won't support iOS 14 - so nothing below 8), what Kits/Classes would you use if the requirements are...
- App can store and play downloaded MP3 files LOCALLY (not necessarily streamed or embedded).
- User has basic player controls over the audio (play/pause/scrub/volume).
- App has an audio queue (order of track play) that can be adjusted at any time by the app or native iOS controls.
- The user can traverse (backwards/forward seek) through the queue.
- User can select to play on bluetooth audio devices phone is paired to.
- The audio can play in the background (when screen is off, or in another app).
- The app can trigger a track and adjust queue in the background (without user interaction).
- The audio integrates with native iOS controls (RemoteControlEvents).
- The app is a "Now Playable App" per Apple's guidelines.
BONUS (if possible yet):
- App audio can overlay playing music as a directions app does (I realize this may negate the background and "now playing" features, but perhaps it aids the discussion for clearer reasoning to selecting a method for app developers).
So would you use AVAudioPlayer or AVPlayer or MPMusicPlayerController? MPRemoteCommandCenter or MPNowPlayingInfoCenter?
Perhaps some of the requirements are mutually exclusive, or even impossible, but I can't understand why there are so many methods to control audio playback, with no clear delineation between their use cases, or why it matters if the audio is music or speech, downloaded or streamed. Audio is obviously a second class citizen to video at Apple, especially speech, but I would think there should be some direction by now on certain types of basic applications like playlists, podcasts and other types of audio applications.