At first, it seems that none of the Audio Session properties allows you to read the value of this parameter. However, an alternative, though not quite what you are looking for, is to check if the ring is set to on / off and to provide at least a semi-visible vibration effect for your user.
Ronak Chaniyar has shown you the correct answer here , however this is not recommended in iOS 7.0. Instead, use AVAudiSession -setCategory to set the correct category for your audio. If you expect your sound to be muted with a quiet switch or screen lock, use AVAudioSessionCategorySoloAmbient , otherwise use AVAudioSessionCategoryPlayback .
More information about AVAudioSession, its settings and properties can be found here .
Ge0rges
source share