MCPcopy Index your code
hub / github.com/getsentry/XcodeBuildMCP / installAppOnDevice

Function installAppOnDevice

src/utils/device-steps.ts:18–33  ·  view source on GitHub ↗
(
  deviceId: string,
  appPath: string,
  executor: CommandExecutor,
)

Source from the content-addressed store, hash-verified

16 * Install an app on a physical device.
17 */
18export async function installAppOnDevice(
19 deviceId: string,
20 appPath: string,
21 executor: CommandExecutor,
22): Promise<StepResult> {
23 log('info', `Installing app on device ${deviceId}`);
24 const result = await executor(
25 ['xcrun', 'devicectl', 'device', 'install', 'app', '--device', deviceId, appPath],
26 'Install app on device',
27 false,
28 );
29 if (!result.success) {
30 return { success: false, error: result.error ?? 'Failed to install app' };
31 }
32 return { success: true };
33}
34
35/**
36 * Launch an app on a physical device and return the process ID if available.

Callers 2

Calls 2

logFunction · 0.90
executorFunction · 0.50

Tested by

no test coverage detected