Is it possible to play audio with AVAudioPlayer in the background and also mute it with the mute switch on iPhone?
I know I can play audio in the background if I set AVAudioSessionCategoryPlayback but it will not mute with the mute switch. Or if I set AVAudioSessionCategoryAmbient - it will be muted by a switch but also when pressing home button for example - and I don't want that to happen.
UPDATE: I have "App plays audio or streams audio.." in "Required background modes" - so when i set AVAudioSessionCategoryPlayback it continues playing in background even after pressing home button but the mute switch has no effect.