I\'m developing a music application, which should play music in the background.
I use the MPMoviePlayerController
to play the music. My code to initiate
Expanding further on @matt's answer, it's required that you call endReceivingRemoteControlEvents
and resignFirstResponder
when the app comes back into the foreground (applicationDidBecomeActive
). Otherwise the OS assumes you are a bad actor (or forgot to turn them off) and turns off your ability to show the sleep controls entirely, even after you call beginReceivingRemoteControlEvents
again. I added these calls and now the Sleep Controls always show when they should.