I have an app playing a list of .m4a
I'm using this function to get audio playing event when the app was minimised:
AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayback, error: nil)
The problem are that when one audio was finish, the AVAudioPlayer delegate function(audioPlayerDidFinishPlaying, etc) was not received by the app (probably because in background). (it work perfectly when app was not in background)
How can I get the next audio to play even in background?
Thanks!