In my app at particular time i am alerting user with beep sound which i am playing using AVAudioPlayer
.
Now i want this sound to be played even when app is in background. So i can achieve this by setting AVAudioSession
category as AVAudioSessionCategoryPlayback
and i also want that this sound should not stop the ipod music and i can do it with it setting AVAudioPlayer
category AVAudioSessionCategoryAmbient
.
But i want them together means sound should also play in background and it should also not stop the ipod music.
So how can i achieve this?
If it is not possible to play sound with AVAudioSessionCategoryAmbient
category in background then any other workaround this?
Apologies if i am doing any mistake.
Thanks.