My case is simple: I need to play a warning signal and want to make sure the user will hear it, so I want to check the system volume.
How can I find out what the current system volume is?
Go to Settings > Sounds (or Settings > Sounds & Haptics), and drag the Ringer and Alerts slider back and forth a few times. If you don't hear any sound, or if your speaker button on the Ringer and Alerts slider is dimmed, your speaker might need service.
If the buttons don't change anything, go to Settings > Sounds & Haptics, then check that Change with Buttons is turned on. Alternatively, you can alter the volume via the Control Center by swiping down from the top-right of your screen (iPhone X and later).
Update for Swift
let vol = AVAudioSession.sharedInstance().outputVolume
The audio session can provide output volume (iOS >= 6.0).
float vol = [[AVAudioSession sharedInstance] outputVolume]; NSLog(@"output volume: %1.2f dB", 20.f*log10f(vol+FLT_MIN));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With