Skip to content

Instantly share code, notes, and snippets.

@DerLobi
Last active December 23, 2015 03:09
Show Gist options
  • Save DerLobi/6571362 to your computer and use it in GitHub Desktop.
Save DerLobi/6571362 to your computer and use it in GitHub Desktop.
Don't you love it when Xcode shows you `The simulator can't be launched because it is already in use` when you want to run your tests, but your app is still running? At least with `Run` Xcode asks you if you want to stop the current process and you can check a checkmark to always do so. Open Automator, create a new Service, add a new "Execute Ap…
on run {input, parameters}
quit application "iPhone Simulator"
tell application "System Events"
tell process "Xcode"
tell menu bar 1
tell menu bar item "Product"
tell menu "Product"
click menu item "Test"
end tell
end tell
end tell
end tell
end tell
end run
@tibr
Copy link

tibr commented Sep 15, 2013

So good!

@DerLobi
Copy link
Author

DerLobi commented Sep 15, 2013

Updated gist, now works when running from a different Xcode window.

@Gi-lo
Copy link

Gi-lo commented Sep 16, 2013

end tell end tell end tell end tell end tell! Damn you Xcode :D

@DerLobi
Copy link
Author

DerLobi commented Sep 17, 2013

More like damn you AppleScript :D

@robb
Copy link

robb commented Sep 18, 2013

💖

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment