kill iOS Simulator from terminal

Claus picture Claus · Nov 30, 2012 · Viewed 17.6k times · Source

I'm trying to terminate the iOS Simulator from the terminal console (needed for integrating automatic UI Testing in Jenkins),but every time I try the command:

killall SimulatorBridge

a prompt waiting for action gets displayed: enter image description here

The problem is that the simulator doesn't get dismissed until an action on the prompt is taken. How to get rid of it?

Answer

Slav picture Slav · Nov 30, 2012

Use killall "iPhone Simulator"

With XCode 6, use killall "iOS Simulator" (thanks @gempewsaw)

With XCode 7, use killall "Simulator" (thanks @Stanislaw)

With XCode 8, killing the Simulator process is sometimes not enough, also need to kill process com.apple.CoreSimulator.CoreSimulatorService (thanks @bensnider)