In recent iOS versions apps have some kind of access to the media control buttons on the lock screen, like the Play/Pause button:
It looks like the buttons are supposed to work with the MPMusicPlayerController
class, is that right? Is there a way to get the “raw” events from the buttons? Because the music player only seems to offer an API to supply a bunch of MPMediaItem
s. What if my app is for example a radio that needs to handle the buttons differently?