6

I've seen techniques to make sure that an app respects the mute switch, but is it possible to set the iPhone to mute (no sounds from any apps) using the SDK?

ingh.am
  • 25,981
  • 43
  • 130
  • 177
lajos
  • 25,525
  • 19
  • 65
  • 75
  • Why do you want to do this? Perhaps some context would help... – runako Feb 27 '09 at 22:36
  • You shouldn't really do this as you could silence the phone without the users permission. One good thing to do is just mute the sounds/music that your app makes. You can store a global value between 0 and 1 and use this to control the volume. – ingh.am Dec 11 '10 at 23:00

5 Answers5

11

No.

Applications developed using the official SDK cannot change (and in most cases cannot even access) system-wide settings.

Andrew Grant
  • 58,260
  • 22
  • 130
  • 143
7

It is possible, but only using private API's. I only went as far as muting the ringer, but you should be able to control the master level as well.

See How to disable iOS System Sounds

Community
  • 1
  • 1
Sam
  • 26,946
  • 12
  • 75
  • 101
4

It is technically possible to change the system volume through the private AVSystemController class in Celestial.framework, but will prevent your app from getting Apple's approval

rpetrich
  • 32,196
  • 6
  • 66
  • 89
2

As only one app can be running at a time, the only possible use I can think of for this would be to mute other people's apps, and it should be fairly clear why Apple prevents that.

What would I do if an app muted the iPhone and I didn't know it happened? It can't physically move the mute switch on the side of the phone, so that wouldn't match, and I'd have to figure out a) that the phone was muted and b) how to unmute it without the switch.

ceejayoz
  • 176,543
  • 40
  • 303
  • 368
2

I can change volume using AVSystemController, it sets to minimum which is 0.06x. Is there class/API to mute it completely? toggleActiveCategoryMuted does not work