#!/bin/sh

# kill simulator
echo "Killing all top-level simulator processes..."
killall -9 "iPhone Simulator"

# kill xpcproxy_sim zombies by explicitly killing parent process
echo "Killing any xpcproxy_sim zombies..."
ps -edf | \
 grep [x]pcproxy_sim | awk '{print $3}' | \
 sort | uniq | \
 xargs -I{} echo "kill -9 {}" | sh

#!/bin/sh

# kill simulator
echo "Killing all top-level Xcode 5 simulator processes..."
killall -9 "iPhone Simulator"
echo "Killing all top-level Xcode 6 simulator processes..."
killall -9 "iOS Simulator"

echo "Killing ScriptAgent..."
killall -9 "ScriptAgent"

# kill xpcproxy_sim zombies by explicitly killing parent process
echo "Killing any xpcproxy_sim zombies..."
ps -edf | \
 grep [x]pcproxy_sim | awk '{print $3}' | \
 sort | uniq | \
 xargs -I{} echo "kill -9 {}" | sh

Expand kill list to include Xcode 6 processes and scriptAgent
Expand kill list to include Xcode 6 processes and scriptAgent
