views:

120

answers:

0

Hello everyone

I think that it's clear from the title...

The Problem: I already have some objective-c code that uses AVFoundation and its AVAudioPlayer to play some sounds in my iPhone apps, it takes a path for a folder in the documents and plays all the files in it one after the other using an AVAudioPlayer object (I implemented AVAudionPlayerDelegate so I can give the player the next file when the current one is done)...

The Question: Now how can I keep these sounds playing when my app is in the background cause I upgraded my devices to iOS 4.1 and also my iOS SDK and Xcode...

What I did: I added the "UIBackgroundModes" to my info.plist file and put "audio" in it and I set the category for the sharedInstance in AVAudionSeession to AVAudioSessionCategoryPlayback and setActive to YES and no errors happened there but still when I press the home button, the music stops!

What else should I do?

Thanks in advance