Skip to content

Instantly share code, notes, and snippets.

@luisobo luisobo/README.md
Last active Jan 14, 2016

Embed
What would you like to do?
Hide iOS Simulator when running Unit Tests.

Hide iOS Simulator when running Unit Tests.

Based on this work, that @Dan2552 pointed out.

Instructions:

  1. Clone this gist (git clone https://gist.github.com/6201428.git hide_ios_simulator)
  2. Xcode -> Preferences -> Behavior -> Testing -> Generates output
  3. Run script -> Choose script -> Select hide_simulator

Enjoy!

#!/usr/bin/env osascript
if application "iPhone Simulator" is running then
set attempts to 0
tell application "Finder"
repeat while ((visible of process "iPhone Simulator" is false) and (attempts is less than 10))
set visible of process "iPhone Simulator" to false
delay 0.1
set attempts to attempts + 1
end repeat
set visible of process "iPhone Simulator" to false
end tell
end if
@va3093

This comment has been minimized.

Copy link

commented Jan 14, 2016

This didn't work for me. The simulator is still showing when running tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.