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

Function buildLaunchFailure

src/utils/app-lifecycle-results.ts:94–116  ·  view source on GitHub ↗
(
  artifacts: LaunchResultArtifacts,
  message: string,
  options: { target?: LaunchFailureTarget } = {},
)

Source from the content-addressed store, hash-verified

92}
93
94export function buildLaunchFailure(
95 artifacts: LaunchResultArtifacts,
96 message: string,
97 options: { target?: LaunchFailureTarget } = {},
98): LaunchResultDomainResult {
99 const diagnosticMessage = stripKnownPrefix(message, [
100 'Failed to launch app:',
101 'Failed to launch app on device:',
102 'Launch app in simulator operation failed:',
103 'Launch macOS app operation failed:',
104 ]);
105
106 return {
107 kind: 'launch-result',
108 didError: true,
109 error: isMacLaunch(artifacts, options.target)
110 ? 'Failed to launch macOS app.'
111 : 'Failed to launch app.',
112 summary: { status: 'FAILED' },
113 artifacts,
114 diagnostics: createBasicDiagnostics({ errors: [diagnosticMessage] }),
115 };
116}
117
118export function setLaunchResultStructuredOutput(
119 ctx: ToolHandlerContext,

Callers 4

launch_app_simLogicFunction · 0.90

Calls 3

createBasicDiagnosticsFunction · 0.90
stripKnownPrefixFunction · 0.85
isMacLaunchFunction · 0.85

Tested by

no test coverage detected