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

Function resolveCachedPlatform

src/utils/infer-platform.ts:113–139  ·  view source on GitHub ↗
(params: InferPlatformParams)

Source from the content-addressed store, hash-verified

111}
112
113function resolveCachedPlatform(params: InferPlatformParams): SimulatorPlatform | null {
114 const defaults = params.sessionDefaults ?? sessionStore.getAll();
115 if (!isSimulatorPlatform(defaults.simulatorPlatform)) {
116 return null;
117 }
118
119 const hasExplicitId = Boolean(params.simulatorId);
120 const hasExplicitName = Boolean(params.simulatorName);
121
122 if (!hasExplicitId && !hasExplicitName) {
123 return defaults.simulatorPlatform;
124 }
125
126 if (hasExplicitId && defaults.simulatorId && params.simulatorId === defaults.simulatorId) {
127 return defaults.simulatorPlatform;
128 }
129
130 if (
131 hasExplicitName &&
132 defaults.simulatorName &&
133 params.simulatorName === defaults.simulatorName
134 ) {
135 return defaults.simulatorPlatform;
136 }
137
138 return null;
139}
140
141function resolveProjectFromSession(params: InferPlatformParams): {
142 projectPath?: string;

Callers 1

inferPlatformFunction · 0.85

Calls 2

isSimulatorPlatformFunction · 0.85
getAllMethod · 0.80

Tested by

no test coverage detected