Hi
I own a iPhone 3G, and since the simulator of iOS4 does not support background audio (Apple confirmed that), I have no way to test if a MP3 file plays while the app is in the background (with iPhone 3GS and 4).
Reading the documentation, it seems it was enough to add the key to info.plist "Required background modes" with item "App plays audio". Then, watching iTunesU lessons, I discovered that I have to add
Code:
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:nil];
I suppose in applicationDidFinishLaunching
I'm using AVAudioPlayer, btw.
Is this enough? Since I can't test it, I really need this info. Maybe someone already went through this!
Thank a lot!
Fabio