launch_app
Launch iOS apps on simulators by specifying bundle identifiers to test and automate mobile applications in controlled environments.
Instructions
Launch an app on a simulator
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bundle_id | Yes | App bundle identifier (e.g. com.example.myapp) | |
| udid | No | Simulator UDID (optional, defaults to booted simulator) |
Implementation Reference
- src/index.ts:601-611 (handler)The handler function that executes the `launch_app` tool logic using `xcrun simctl`.
private async launchApp(bundleId: string, udid?: string) { const target = await resolveUdid(udid); try { const { stdout } = await execAsync(`xcrun simctl launch ${target} ${bundleId}`); return { content: [{ type: 'text', text: `Launched ${bundleId} on ${target}. ${stdout.trim()}` }], }; } catch (error: any) { throw new McpError(ErrorCode.InternalError, `Failed to launch app: ${error.message}`); } } - src/index.ts:310-320 (schema)The schema definition for the `launch_app` tool.
name: 'launch_app', description: 'Launch an app on a simulator', inputSchema: { type: 'object', properties: { bundle_id: { type: 'string', description: 'App bundle identifier (e.g. com.example.myapp)' }, udid: { type: 'string', description: 'Simulator UDID (optional, defaults to booted simulator)' }, }, required: ['bundle_id'], additionalProperties: false, }, - src/index.ts:498-499 (registration)The tool registration handler that maps the `launch_app` tool call to the `launchApp` function.
case 'launch_app': return this.launchApp(args.bundle_id as string, args.udid);