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

Function inferPlatformsFromExisting

src/cli/commands/setup.ts:175–188  ·  view source on GitHub ↗
(config?: ProjectConfig)

Source from the content-addressed store, hash-verified

173}
174
175function inferPlatformsFromExisting(config?: ProjectConfig): SetupPlatform[] {
176 if (!config) return [];
177
178 const stored = config.setupPreferences?.platforms;
179 if (stored && stored.length > 0) {
180 return [...stored];
181 }
182
183 // No stored preference: only macOS is unambiguously recoverable from enabledWorkflows.
184 // Simulator-platform identity (iOS vs tvOS vs watchOS vs visionOS) cannot be inferred
185 // from workflow ids alone, so leave it blank and let the wizard re-prompt.
186 const workflows = new Set(config.enabledWorkflows ?? []);
187 return workflows.has('macos') ? ['macOS'] : [];
188}
189
190function derivePlatformSessionDefault(platforms: SetupPlatform[]): string | undefined {
191 if (platforms.length !== 1) return undefined;

Callers 1

collectSetupSelectionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected