xc-mcp
Version:
MCP server that wraps Xcode command-line tools for iOS/macOS development workflows
64 lines • 4.68 kB
TypeScript
interface IdbLaunchArgs {
udid?: string;
bundleId: string;
streamOutput?: boolean;
arguments?: string[];
environment?: Record<string, string>;
}
/**
* Launch application on iOS target - start apps with optional output streaming and environment control
*
* **What it does:**
* Launches installed applications by bundle ID with optional stdout/stderr streaming, command-line
* arguments, and environment variables. Extracts process ID for tracking, streams app output when
* debugging is needed, and provides detailed error guidance for launch failures (app not installed,
* already running, crashed on launch).
*
* **Why you'd use it:**
* - Start apps programmatically for automated testing workflows - no manual interaction required
* - Stream stdout/stderr for debugging app behavior and crash analysis during test execution
* - Pass launch arguments and environment variables for test configuration and feature flags
* - Track process IDs for monitoring app lifecycle and termination in multi-app orchestration
*
* **Parameters:**
* - bundleId (required): App bundle identifier (from idb-list-apps or app installation)
* - udid (optional): Target identifier - auto-detects if omitted
* - streamOutput (optional): Boolean - enable stdout/stderr capture with -w flag
* - arguments (optional): Array of command-line arguments to pass to app
* - environment (optional): Object of environment variables to set (KEY=VALUE format)
*
* **Returns:**
* Launch status with success indicator, bundle ID, extracted process ID, streaming status,
* captured stdout/stderr (if streaming enabled), error details if failed, and troubleshooting
* guidance (app not found, already running, crash logs).
*
* **Example:**
* ```typescript
* // Simple launch for UI automation
* const result = await idbLaunchTool({
* bundleId: 'com.example.MyApp'
* });
*
* // Launch with debug output streaming
* await idbLaunchTool({
* bundleId: 'com.example.MyApp',
* streamOutput: true,
* environment: { DEBUG: '1', LOG_LEVEL: 'verbose' }
* });
* ```
*
* **Full documentation:** See idb/launch.md for detailed parameters and streaming options
*
* @param args Tool arguments with bundle ID and optional launch configuration
* @returns Tool result with launch status and process ID
*/
export declare function idbLaunchTool(args: IdbLaunchArgs): Promise<{
content: {
type: "text";
text: string;
}[];
isError: boolean;
}>;
export declare const IDB_LAUNCH_DOCS = "\n# idb-launch\n\nLaunch application on iOS target - start apps with optional output streaming and environment control.\n\n## Overview\n\nLaunches installed applications by bundle ID with optional stdout/stderr streaming, command-line arguments, and environment variables. Extracts process ID for tracking, streams app output when debugging is needed, and provides detailed error guidance for launch failures (app not installed, already running, crashed on launch).\n\n## Parameters\n\n### Required\n- **bundleId** (string): App bundle identifier (from idb-list-apps or app installation)\n\n### Optional\n- **udid** (string): Target identifier - auto-detects if omitted\n- **streamOutput** (boolean): Enable stdout/stderr capture with -w flag\n- **arguments** (string[]): Command-line arguments to pass to app\n- **environment** (object): Environment variables to set (KEY=VALUE format)\n\n## Returns\n\nLaunch status with success indicator, bundle ID, extracted process ID, streaming status, captured stdout/stderr (if streaming enabled), error details if failed, and troubleshooting guidance (app not found, already running, crash logs).\n\n## Examples\n\n### Simple launch for UI automation\n```typescript\nconst result = await idbLaunchTool({\n bundleId: 'com.example.MyApp'\n});\n```\n\n### Launch with debug output streaming\n```typescript\nawait idbLaunchTool({\n bundleId: 'com.example.MyApp',\n streamOutput: true,\n environment: { DEBUG: '1', LOG_LEVEL: 'verbose' }\n});\n```\n\n### Launch with arguments\n```typescript\nawait idbLaunchTool({\n bundleId: 'com.example.MyApp',\n arguments: ['--test-mode', '--skip-intro']\n});\n```\n\n## Related Tools\n\n- idb-list-apps: Find bundle ID of installed apps\n- idb-terminate: Stop running app\n- idb-ui-tap: Interact with launched app UI\n\n## Notes\n\n- With -w flag: Streams stdout/stderr (useful for debugging)\n- Without -w: Fire and forget (app runs in background)\n- Returns process ID for tracking app lifecycle\n- Supports command-line arguments and environment variables\n- IDB uses --env KEY=VALUE format for environment variables\n";
export {};
//# sourceMappingURL=launch.d.ts.map