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

Function resolveSimulatorIdOrName

src/utils/simulator-resolver.ts:92–113  ·  view source on GitHub ↗
(
  executor: CommandExecutor,
  simulatorId: string | undefined,
  simulatorName: string | undefined,
)

Source from the content-addressed store, hash-verified

90 * If only simulatorName is provided, resolves it via simctl.
91 */
92export async function resolveSimulatorIdOrName(
93 executor: CommandExecutor,
94 simulatorId: string | undefined,
95 simulatorName: string | undefined,
96): Promise<SimulatorResolutionResult> {
97 if (simulatorId) {
98 return {
99 success: true,
100 simulatorId,
101 simulatorName: simulatorName ?? simulatorId,
102 };
103 }
104
105 if (simulatorName) {
106 return resolveSimulatorNameToId(executor, simulatorName);
107 }
108
109 return {
110 success: false,
111 error: 'Either simulatorId or simulatorName must be provided.',
112 };
113}

Callers 1

prepareTestSimExecutionFunction · 0.90

Calls 1

resolveSimulatorNameToIdFunction · 0.85

Tested by

no test coverage detected