Skip to content

Instantly share code, notes, and snippets.

@michaello
michaello / activate_after_build.sh
Created May 15, 2020 17:38
I HATE WHEN SIMULATOR BECOMES ACTIVE AFTER BUILD
#!/bin/bash
osascript <<EOD
set start_time to do shell script "ruby -e 'print Time.now.to_i'"
repeat while true
tell application "System Events"
set activeApp to name of application processes whose frontmost is true
if activeApp is not "Xcode" then
tell process "Xcode"
set frontmost to true