How to handle Unable to boot device in current state: Booted

Hi all,

Good afternoon!

I have appium 2 automation for iOS, when i run the code via automation my simulator shows below pop-up then i have to manually click “ok” to open simulator eventhough my simulator is running automatically in code.

Unable to boot device in current state: Booted

Any solution in code to resolve this please?

XCUITestOptions ios =
new XCUITestOptions()
.setDeviceName(“iPhone 13”)
“Environments.twlios.appium.bundleId”)) // or use bundleId

    try {
      driver = new IOSDriver(url, ios);


If you still have this issue, try the followings(in this order):

  1. - iOS default behaviour is to launch the most recent used simulator so it might cause issues, try to disable this checkbox.
  2. - this is a script you can execute to make sure the simulator’s state is shutdown. this is a good practice to keep a clean environment, note that you shutdown a specific device.
  3. - if still occur, try this, note it will shutdown all simulators so you can use it only if you are not running simulators simultaneously.
1 Like

yeah… Below option working fine.Thanks lot.

I found solution. Simulator -> Preferences -> Simulator lifetime: When Simulator starts boot the most recently used simulator I unchecked.

But any way to handle that programmatically?

simply update xcuitest driver to the most recent version