Is there an option to turn off the sound on the iPhone Simulator? Or to adjust the volume?
-
Added a bounty - I personally do not care if getting such thing to work would actually mean hacking the simulator itself. The awarded answer needs to effectively silence `MPMoviePlayerController`. – Till Mar 10 '13 at 04:25
-
I did try "Hear" as that one seemed to be a promising solution for adjusting the volume of individual applications run on OSX but unfortunately it does not detect/support the simulator. – Till Mar 10 '13 at 04:27
-
I did also try "Soundbunny" and even though it does display a slider for the iOS Simulator, it unfortunately does not control its volume at all. – Till Mar 10 '13 at 04:52
-
I've found this link below, maybe this will help you. http://stackoverflow.com/questions/5867341/how-to-turn-off-audio-in-mpmovieplayercontroller-iphone – Mike Mar 10 '13 at 09:47
-
@Mike unfortunately that does not help as is wont change any results on the simulator. – Till Mar 10 '13 at 18:43
11 Answers
Partial Success - There are no good options
The iPhone Simulator selects the currently selected output at launch. Using Soundflower plugin and sending the audio to nowhere I started the iPhone Simulator. If you then switch to a different, working, output the simulator will remain 'muted' until you restart the simulator. So in general, you can attempt to trick the simulator to output to a dead end output.
Experimental setup - A sample video player
I'm working on a solution to this problem and as a first step created a demonstration video player app. You can download VideoPlayer from GitHub for your own experiments.
First Attempt - Use a 3rd party app to mute it
Tried using Audio Hijack Pro by Rogue Amoeba to hijack the audio stream and mute it. This didn't work and crashes the simulator. Contacted support and they reported that iPhone Simulator does some things that prevent them from hijacking the audio. I also looked into Soundflower and Jack.
Second Attempt - In-app mute
I was thinking maybe you could make a debug option where when in the app and on the simulator sound would be muted. However, within an app, only private APIs have the power to mute or reduce volume for the device. In the book iPhone Open Application Development Chapter 6, Example "What's My Volume' gives sample code for manipulating system-wide sound through the AVSystemController. It might be fun to explore this route, but to make it into a weaponized tool would require a lot of trouble since you need to compile against private headers.
Idea Three
Find a command-line option to pass to the Springboard or iPhone Simulator that will mute sound, or re-enable the volume control within the simulator, and of course be able to still launch the debugger.
Enhancement Request
I filed an Apple Bug Report enhancement request for both iPhone Simulator volume control, request 13428429, and per application volume control in Mac OS X, request 13428420. If you want these features, please file your own bug.

- 21,528
- 7
- 125
- 126
-
Idea Three is what I also tried to find - checked all available Info.plist's within the simulator folder-tree for suspicious entries but by default it does not seem to contain such option. I was also hoping that similar to the infamous "giraffe" setting, there would be another undocumented setting for sound. To get deeper into that, one would have to have a close look at the simulator binaries (hex, disassembler, ...) but that I did not do yet. – Till Mar 12 '13 at 04:51
-
I did the same. I think you are looking at binary hacking if your are focusing on the simulator side. A more promising approach would be to figure out how it is connecting the the sound system and mute that. – Cameron Lowell Palmer Mar 12 '13 at 11:27
-
Did you get closer to our goal? Just asking cause the bounty will expire in three days and I would love to assign it to you if you had some progress to show... :D – Till Mar 14 '13 at 00:28
-
1I found a workaround. I'm still looking into other possibilities. – Cameron Lowell Palmer Mar 14 '13 at 14:17
-
I ran into this -- my (working) music audio was being routed through the iOS simulator before reaching my headphones, making the music tinny and low-quality. This made developing in the sim really annoying. Fortunately there's an easy fix:
- In the simulator, route the incoming sound from your Mac's microphone
- Still in the simulator, route the outgoing audio through your Mac's speakers, or any other audio channel you aren't using
Changing the incoming audio route:
Changing the outgoing audio route:

- 1
- 1

- 581
- 5
- 13
-
3
-
2I have version 11.4.1 and the menu option is now called "I/O", but still works! – crobicha May 06 '20 at 17:54
Open iOS Simulator, press Hardware > Decrease Volume (⌘↓) until it's muted! I think it was added at Xcode 9.2, and that it's available only when running sim with iOS 11 and above

- 1,317
- 1
- 16
- 22
-
3This unfortunately won't mute keyboard sounds (and there's also no option to turn them off in the settings). – Miscreant Jun 17 '18 at 02:40
You can use something like...
#if DEBUG
[ myAudioController setVolume: .1 ];
#endif
This way during testing, the app will have a lower volume.

- 6,603
- 1
- 35
- 32

- 75
- 1
- 3
-
This doesn't answer the question. The question is about the simulator – Cameron Lowell Palmer Jan 11 '15 at 08:34
-
3You might be correct this doesn't answer your question correctly. Problem is just, the whole post everybody is talking about any complicated problems while there's no solution for switching it off easily from the menu. Imho @AzulValium solved the problem like I did with one line and without wasting time. – Alex Cio Jun 12 '15 at 13:22
-
@CameronLowellPalmer That is actually a proper solution for a temporary issue caused by ios simulators. – Rockyfish Mar 10 '17 at 17:35
-
@Rockyfish I'd have to check, but at the time of the comment, 2015, it did nothing for the Simulator – Cameron Lowell Palmer Mar 10 '17 at 17:36
referred from : iOS Simulator Sound
Both the input and output device much match in system sound settings. Often u have them set to different devices. If they don't match, the simulator seems to default to the last connected audio device selected among the input and output devices.
I hope it helps out in any way.
-
This is mostly a copy&pasted answer - http://stackoverflow.com/a/5056682/91282 it does even contain the same typoes. – Till Mar 13 '13 at 00:26
-
@Till I think Suhaiyl meant his link to it to be an attribution of the answer. I've clarified that a bit in an edit for him. Thanks for bringing it up, though; as we do take plagiarism seriously! – Andrew Barber Mar 13 '13 at 03:14
-
@AndrewBarber great idea to modify the formatting - should have done that myself. Thanks! – Till Mar 13 '13 at 03:40
-
In my case i just set audio output to somewhere which is muted. Like my external screen :)

- 3,334
- 1
- 32
- 31
Solution for tvOS simulator:
Go to menu -> General -> Video and Audio -> turn 'Navigation Clicks' and 'Sound Effects and Music' off

- 778
- 7
- 16
[[MPMusicPlayerController applicationMusicPlayer] setVolume:0.0];
This works for device, just give a try for simulator. How do you set the hardware volume in an iPhone app?
You can even try the reverse of this thread to see. Sound not working in iPhone Simulator?

- 1
- 1

- 456
- 6
- 19
Simple solution.
Make sure you have 2 outputs in your mac. For example, built in speakers and headphones.
Close the iOS Simulator.
Change the output source to the one you are not using (alt-click over the speaker in the top bar).
Run again the iOS simulator. It will take its default output source
to the one in the system.Change the output source to the one you are using and enjoy. The iOS simulator doesn't update it's output source when the system changes it.

- 2,139
- 1
- 19
- 31