As per our requirement we need to play sound even if the app is in background. We are using [AVAudioPlayer Play]
for the purpose of playing sound.
It works if the application is in foreground. But if application is in background and we are playing song in music player as well and then control goes to [AVAudioPlayer Play]
statement, nothing happens.
We have already gone through many links, added the background modes in plist and have also added [[UIApplication sharedApplication] beginReceivingRemoteControlEvents];
but things did not work out.
Please suggest if there are any other alternatives.