Terminate App (IDB)
idb-terminateForce-quit running iOS apps by bundle ID to reset app state for clean testing. Idempotent termination succeeds even if app isn't running, enabling reliable reinstall and test reruns.
Instructions
idb-terminate
Terminate running application - force-quit apps for clean state testing and debugging.
Overview
Force-terminates running applications by bundle ID with immediate stop (no graceful shutdown). Idempotent operation that succeeds even if app not running. Detects whether app was actually running from output parsing to provide accurate status. Essential for resetting app state between test runs and preparing for reinstallation.
Parameters
Required
bundleId (string): App bundle identifier to terminate
Optional
udid (string): Target identifier - auto-detects if omitted
Returns
Termination status with success indicator, bundle ID, wasRunning flag (parsed from output to distinguish actual termination from no-op), command output, error details if failed, and next steps guidance (relaunch, reinstall, verification).
Examples
Force-quit app before reinstall
const result = await idbTerminateTool({
bundleId: 'com.example.MyApp'
});Stop app on specific device
await idbTerminateTool({
bundleId: 'com.example.MyApp',
udid: 'DEVICE-UDID-123'
});Related Tools
idb-launch: Relaunch app after termination
idb-list-apps: Verify running status before/after termination
idb-uninstall: Remove app after termination for clean install
Notes
This is a force-kill operation (not graceful shutdown)
Idempotent - succeeds even if app not running
IDB terminate sends termination signal to running app
wasRunning flag indicates if app was actually terminated vs already stopped
Safe to call multiple times - no error if app already stopped
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| udid | No | ||
| bundleId | Yes |