Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

2 Answers 2

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

-MandyW

  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 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 at 17:58

Just build it rather than build and run.

enable console viewing in debugging and disable the iPhone simulator part?

share|improve this answer
    
I still want the tests to run though and that would not run the tests. –  jasongregori May 30 '13 at 19:51
    
What sort of tests are you trying to run without the iPhone simulator, surely this is where the run tests would be ran, so you can see it in process. Otherwise just run the tests through the console as opposed to the simulator. –  Will Webb May 30 '13 at 20:10
1  
I want it to open, I just want it to stay in the background and not come to the foreground :) –  jasongregori May 30 '13 at 22:34
    
Only thing I could suggest then is drag the simulator to another desktop? This way when it is brought to the foreground automatically when you have pressed run/test it will just come to the foreground of the different desktop not affecting your current working environment. –  Will Webb May 31 '13 at 11:54
    
Are you talking about spaces? Unfortunately that switches spaces taking me away from my code. If your talking about another monitor, I only have one. –  jasongregori May 31 '13 at 17:14

Your Answer

 
discard

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.