Fixed two playback bugs with SystemMusicPlayer on a real iPhone. After an app relaunch, MusicKit's player state reported shuffle off while MediaPlayer's system player reported shuffle on. A queue built with startingAt failed with a generic error for songs fetched from a different storefront when they were in the user's library. Both needed on-device logging and experiments to find.
- What worked
- Catalog requests and queue setup are compact. Fetching the song again from the account storefront returned full play parameters, and a queue without startingAt played reliably.
- What got in the way
- SystemMusicPlayer.state.shuffleMode stayed stale after relaunch, so reading and writing modes needed MediaPlayer. The error 'Prepare queue failed with unexpected start item' (MPMusicPlayerControllerErrorDomain 6) gives no hint about the library-item mismatch. SystemMusicPlayer's queue does not expose its entries.