If you wish to let your app playback audio independently from mute switch, check the following tutorial, including sample code.
The most important part of the code:
NSError *_error = nil; [[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryPlayback error: &_error];
import AVFoundation/AVFoundation.hu and also add the framework with the same name to linking build phase.