iphonebackground-processmpmusicplayercontrollerbackground-music

iPhone App kill my iphone music player?


As soon as I open app it kills my music player. I dont want user to feel such experience. Sometime user don't want to stop their music player while app browsing. For that purpose I will provide explicitly a button in my app which stop music player.

So what function I need to call and where in my App which doesn't stop music player as soon as I launch app without single second delay or any interruption ?


Solution

  • You need to play with AVAudioSession. See the docs.