< Back

# Simulator in use

If you’ve ever been annoyed by this one:

You may find the following Run Script interesting which is simply added as a Build Phase.

This will kill your currently running iPhone Simulator instance, then sleep for two seconds to prevent Xcode from nagging you (see first screenshot) and return 0 to ensure we won’t exit with a statuscode of 1 in case no simulator is currently running.

For easy copy and paste:

killall "iPhone Simulator"; sleep 2; exit 0;

That’s it folks!

Impressum • Mastodon • Bluesky