1

I have written a music player app, and I am trying to add a feature to save all the information I possibly can about the current playing song when the audio stops or the app is quit (some examples are when library updates occur, or the song changes in the background). The goal is to be able to resume audio (mostly for audiobooks) where the user left off, in any reasonable circumstances.

I have been doing considerable research on methods to keep the app running in some form in the background, but I have not been able to implement any of them successfully.

My Goal:

  • Respond to playback changes with app in background

What I have:

  • info.plist entry - UIApplicationExitsOnSuspend = NO
  • info.plist entry - UIBackgroundModes -> item0 = audio
  • [MPMusicPlayerController iPodMusicPlayer] is what I am using for playback
  • App targeting iOS5+iOS6

Questions (basically, is this a fruitless endeavor):

  • does using iPodMusicPlayer preclude my app from running in the background inherently, since it is not actively actually doing anything in my app?
  • what method of playback, if any, would keep my app active without potentially having to essentially rewrite a good chunk of it
  • with the fairly simple goals in mind, are there limits on what can be run in the background that would make them impossible?

Would very much appreciate any help on a direction to take on this.

solenoid
  • 954
  • 1
  • 9
  • 20

0 Answers0