I am playing music in iphone and when I run my application it should not stop background device music and should stop its own music instead background music is getting stop. I want to do same as candy crush app. What should I do to resolve this? Please help me
var isOtherAudioPlaying = AVAudioSession.sharedInstance().otherAudioPlaying
println("isOtherAudioPlaying>>> \(isOtherAudioPlaying)")
if(isOtherAudioPlaying == false)
{
audioPlayer1!.play()
}