MPMusicPlayerController: Lag In Play-Pause Performance of Apple Music Content Results in Blocks On Main Thread, UI Freezes

Number:rdar://38380620 Date Originated:3/12/2018
Status:Open Resolved:No
Product:iOS Product Version:11.2.6
Classification:Bug Reproducible:Yes
Media Player Framework

When implementing a player based on MPMusicPlayerController, rapid repeated calls to the play() and pause() methods results in permanent UI Freezes on iPhoneX devices.  On other iPhone devices, UI can hang for several seconds before coming back.

Steps to Reproduce:
1.  Install iTunes on an iPhoneX or other iPhone device, login into or create an Apple Music Account, and select a track for playback.

2.  Build and run the attached project on an iPhoneX or other iPhone device.

3.  Tap on the Play/Pause toggle button in rapid succession for several seconds.  You begin to hear an audible lag in playback that increases over time, and the title in Play/Pause button will begin to intermittently freeze.  On iPhoneX devices, the title will eventually fail to update, and the "Go to next view" button will become unresponsive.

Expected Results:
Repeated, rapid calls to play or playlist methods on MPMusicPlayerController should not block the main thread and respond to state changes immediately.

Actual Results:
Main thread blocks and UI can completely freeze on iPhoneX devices.

11.2.6 (15D100)

iPhoneX with iTunes/Apple Music installed.


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!