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

Function prepareBuildSimExecution

src/mcp/tools/simulator/build_sim.ts:99–145  ·  view source on GitHub ↗
(
  params: BuildSimulatorParams,
  executor: CommandExecutor,
)

Source from the content-addressed store, hash-verified

97}
98
99async function prepareBuildSimExecution(
100 params: BuildSimulatorParams,
101 executor: CommandExecutor,
102): Promise<PreparedBuildSimExecution> {
103 const configuration = params.configuration ?? 'Debug';
104 const useLatestOS = params.useLatestOS ?? true;
105 const inferred = await inferPlatform(
106 {
107 projectPath: params.projectPath,
108 workspacePath: params.workspacePath,
109 scheme: params.scheme,
110 simulatorId: params.simulatorId,
111 simulatorName: params.simulatorName,
112 },
113 executor,
114 );
115 const detectedPlatform = inferred.platform;
116 const platformName = detectedPlatform.replace(' Simulator', '');
117
118 return {
119 configuration,
120 detectedPlatform,
121 platformName,
122 sharedBuildParams: { ...params, configuration },
123 platformOptions: {
124 platform: detectedPlatform,
125 simulatorName: params.simulatorName,
126 simulatorId: params.simulatorId,
127 useLatestOS: params.simulatorId ? false : useLatestOS,
128 logPrefix: `${platformName} Simulator Build`,
129 },
130 invocationRequest: {
131 scheme: params.scheme,
132 workspacePath: params.workspacePath,
133 projectPath: params.projectPath,
134 derivedDataPath: resolveEffectiveDerivedDataPath(params),
135 configuration,
136 platform: detectedPlatform,
137 simulatorName: params.simulatorName,
138 simulatorId: params.simulatorId,
139 },
140 warningMessage:
141 params.simulatorId && params.useLatestOS !== undefined
142 ? 'useLatestOS parameter is ignored when using simulatorId (UUID implies exact device/OS)'
143 : undefined,
144 };
145}
146
147const publicSchemaObject = baseSchemaObject.omit({
148 projectPath: true,

Callers 2

createBuildSimExecutorFunction · 0.85
build_simLogicFunction · 0.85

Calls 2

inferPlatformFunction · 0.90

Tested by

no test coverage detected