Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The iPhone Simulator annoyingly pops up when I run tests in Xcode and interrupts my work flow. This is especially annoying if I'm in fullscreen mode. I want it to open and stay in the background.

If there is a solution that makes the Simulator always stay in the background (even when not testing) I'm ok with that as long as I can turn it off.

share|improve this question

Currently, it seems that there is no support for this in Xcode or the iOS Simulator. There are a few workarounds listed here.

StackOverflow how to run tests without launching iOS Simulator

Personally, the easiest thing for me has been to use a secondary monitor, but if that is not an option, some of the other suggested workarounds are:

  1. "Command + U, followed by Command + H when launching unit tests. (Control + H hides the simulator after it appears.)" - markshiz

  2. Don't set any bundle loader or test host build settings, instead just add the .m files you are unit testing to the Build Phases Compile Sources, then run the unit tests from the command line using:

xcodebuild -verbose -target TheElementsUnitTests -configuration Debug -sdk iphonesimulator5.0 clean build


  1. Run an AppleScript in Generates output in Testing behavior configuration:

#!/usr/bin/osascript activate application "Xcode"

-Rudolf Adamkovic

share|improve this answer
Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. – Cfinley Jul 30 '14 at 17:20
Sure, thanks for the tip. I didn't think it was necessary to copy the information from the link, but if that's the community's preference, I'm happy to oblige! – oxym0r0n Jul 30 '14 at 17:58

In the Simulator menu on top click on "Window" -> "Stay in Front". This places the Simulator to stay always as top window above all other windows. And then minimize the Simulator Window with the small yellow dot into the dock. In this way the Simulator stays hidden in the dock and does not come forward automatically.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.