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

Function extractState

src/utils/xcode-state-watcher.ts:81–92  ·  view source on GitHub ↗

* Extract scheme and simulator ID from xcuserstate file

(filePath: string)

Source from the content-addressed store, hash-verified

79 * Extract scheme and simulator ID from xcuserstate file
80 */
81function extractState(filePath: string): { scheme: string | null; simulatorId: string | null } {
82 try {
83 const result = parseXcuserstate(filePath);
84 return {
85 scheme: result.scheme ?? null,
86 simulatorId: result.simulatorId ?? null,
87 };
88 } catch (e) {
89 log('warn', `[xcode-watcher] Failed to parse xcuserstate: ${e}`);
90 return { scheme: null, simulatorId: null };
91 }
92}
93
94/**
95 * Handle file change event (debounced)

Callers 2

processFileChangeFunction · 0.85
startXcodeStateWatcherFunction · 0.85

Calls 2

parseXcuserstateFunction · 0.90
logFunction · 0.90

Tested by

no test coverage detected