mobile_uninstall_app
Remove applications from iOS or Android mobile devices by specifying the device identifier and app bundle ID or package name.
Instructions
Uninstall an app from mobile device
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device | Yes | The device identifier to use. Use mobile_list_available_devices to find which devices are available to you. | |
| bundle_id | Yes | Bundle identifier (iOS) or package name (Android) of the app to be uninstalled |
Implementation Reference
- src/server.ts:311-324 (registration)Registration of the 'mobile_uninstall_app' tool, including input schema (device, bundle_id) and handler that delegates to the appropriate Robot's uninstallApp methodtool( "mobile_uninstall_app", "Uninstall App", "Uninstall an app from mobile device", { device: z.string().describe("The device identifier to use. Use mobile_list_available_devices to find which devices are available to you."), bundle_id: z.string().describe("Bundle identifier (iOS) or package name (Android) of the app to be uninstalled"), }, async ({ device, bundle_id }) => { const robot = getRobotFromDevice(device); await robot.uninstallApp(bundle_id); return `Uninstalled app ${bundle_id}`; } );
- src/android.ts:372-381 (helper)Implementation of uninstallApp in AndroidRobot using adb uninstall commandpublic async uninstallApp(bundleId: string): Promise<void> { try { this.adb("uninstall", bundleId); } catch (error: any) { const stdout = error.stdout ? error.stdout.toString() : ""; const stderr = error.stderr ? error.stderr.toString() : ""; const output = (stdout + stderr).trim(); throw new ActionableError(output || error.message); } }
- src/ios.ts:162-172 (helper)Implementation of uninstallApp in IosRobot using go-ios uninstall commandpublic async uninstallApp(bundleId: string): Promise<void> { await this.assertTunnelRunning(); try { await this.ios("uninstall", "--bundleid", bundleId); } catch (error: any) { const stdout = error.stdout ? error.stdout.toString() : ""; const stderr = error.stderr ? error.stderr.toString() : ""; const output = (stdout + stderr).trim(); throw new ActionableError(output || error.message); } }
- src/mobile-device.ts:164-166 (helper)Implementation of uninstallApp in MobileDevice (for simulators) using mobilecli apps uninstall commandpublic async uninstallApp(bundleId: string): Promise<void> { this.runCommand(["apps", "uninstall", bundleId]); }