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

Function filterSimulatorsByPlatforms

src/cli/commands/setup.ts:195–210  ·  view source on GitHub ↗
(
  simulators: ListedSimulator[],
  platforms: SetupPlatform[],
)

Source from the content-addressed store, hash-verified

193}
194
195function filterSimulatorsByPlatforms(
196 simulators: ListedSimulator[],
197 platforms: SetupPlatform[],
198): ListedSimulator[] {
199 const nonMacPlatforms = platforms.filter((p) => p !== 'macOS') as Exclude<
200 SetupPlatform,
201 'macOS'
202 >[];
203 if (nonMacPlatforms.length !== 1) return simulators;
204
205 const keywords = SIMULATOR_RUNTIME_KEYWORDS[nonMacPlatforms[0]];
206 const filtered = simulators.filter((sim) =>
207 keywords.some((keyword) => sim.runtime.includes(keyword)),
208 );
209 return filtered.length > 0 ? filtered : simulators;
210}
211
212function getWorkflowOptions(
213 debug: boolean,

Callers 1

selectSimulatorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected