Search code examples
iphoneobjective-cmpmusicplayercontroller

MPMusicPlayerController not play on background


i am using MPMusicPlayerController in my app and when i enter to background it stop playing.

this is how i add it :

musicPlayer = [MPMusicPlayerController iPodMusicPlayer];

Solution

  • You need to indicate in your app's plist file that you want to play audio in the background.