Loading...
Loading...
Compare original and translation side by side
tabIdentifierXcodeListWindows1. XcodeListWindows → list of (tabIdentifier, workspacePath) pairs
2. Match workspacePath to your project
3. Use that tabIdentifier for all subsequent tool callsXcodeListWindowstabIdentifierXcodeListWindows1. XcodeListWindows → (tabIdentifier,workspacePath)键值对列表
2. 将workspacePath与你的项目匹配
3. 在后续所有工具调用中使用该tabIdentifierXcodeListWindows1. BuildProject(tabIdentifier)
2. Check buildResult — if success, done
3. GetBuildLog(tabIdentifier) → parse errors
4. XcodeListNavigatorIssues(tabIdentifier) → canonical diagnostics
5. XcodeUpdate(file, fix) for each diagnostic
6. Go to step 1 (max 5 iterations)
7. If same error persists after 3 attempts → fall back to axiom-xcode-debuggingXcodeListNavigatorIssuesaxiom-xcode-debugging1. BuildProject(tabIdentifier)
2. 检查buildResult —— 如果成功,流程结束
3. GetBuildLog(tabIdentifier) → 解析错误
4. XcodeListNavigatorIssues(tabIdentifier) → 获取标准诊断信息
5. 针对每个诊断信息调用XcodeUpdate(file, fix)
6. 返回步骤1(最多迭代5次)
7. 如果3次尝试后相同错误仍存在 → 回退到axiom-xcode-debuggingXcodeListNavigatorIssuesaxiom-xcode-debugging1. GetTestList(tabIdentifier) → discover available tests
2. RunSomeTests(tabIdentifier, [specific failing tests]) for fast iteration
3. Parse failures → identify code to fix
4. XcodeUpdate(file, fix) to patch code
5. Go to step 2 (max 5 iterations per test)
6. RunAllTests(tabIdentifier) as final verificationRunSomeTeststestResult1. GetTestList(tabIdentifier) → 发现可用测试
2. RunSomeTests(tabIdentifier, [特定失败测试]) 以实现快速迭代
3. 解析失败结果 → 确定需要修复的代码
4. 调用XcodeUpdate(file, fix)修补代码
5. 返回步骤2(每个测试最多迭代5次)
6. 最后调用RunAllTests(tabIdentifier)进行验证RunSomeTeststestResult1. RenderPreview(tabIdentifier, file, viewName) → image artifact
2. Review the rendered image for correctness
3. If making changes: XcodeUpdate → RenderPreview again
4. Compare before/after for regressions1. RenderPreview(tabIdentifier, file, viewName) → 生成图片产物
2. 检查渲染后的图片是否正确
3. 如果需要变更:调用XcodeUpdate → 再次调用RenderPreview
4. 对比前后版本以检查回归问题1. XcodeListNavigatorIssues(tabIdentifier) → all current issues
2. For specific files: XcodeRefreshCodeIssuesInFile(tabIdentifier, file)
3. Prioritize: errors > warnings > notes
4. Fix errors first, rebuild, re-check1. XcodeListNavigatorIssues(tabIdentifier) → 获取所有当前问题
2. 针对特定文件:调用XcodeRefreshCodeIssuesInFile(tabIdentifier, file)
3. 优先级:错误 > 警告 > 提示
4. 先修复错误,重新构建,再重新检查1. DocumentationSearch(query) → documentation results
2. Cross-reference with axiom-apple-docs for bundled Xcode guidesDocumentationSearchaxiom-apple-docs1. DocumentationSearch(query) → 获取文档结果
2. 结合axiom-apple-docs交叉引用Xcode内置指南DocumentationSearchaxiom-apple-docs| Operation | Tool | Notes |
|---|---|---|
| Read file contents | | Sees Xcode's project view (generated files, resolved packages) |
| Create new file | | Creates file in project — does NOT add to Xcode targets |
| Edit existing file | | str_replace-style patches — safer than full rewrites |
| Search for files | | Pattern matching within the project |
| Search file contents | | Content search with line numbers |
| List directory | | Directory listing |
| Create directory | | Creates directories |
| 操作 | 工具 | 说明 |
|---|---|---|
| 读取文件内容 | | 可查看Xcode的项目视图(生成文件、已解析的包) |
| 创建新文件 | | 在项目中创建文件——不会添加到Xcode目标中 |
| 编辑现有文件 | | 基于字符串替换的补丁——比完全重写更安全 |
| 搜索文件 | | 项目内的模式匹配 |
| 搜索文件内容 | | 带行号的内容搜索 |
| 列出目录 | | 目录列表 |
| 创建目录 | | 创建目录 |
| Operation | Tool | Risk |
|---|---|---|
| Delete file/directory | | Irreversible — confirm with user first |
| Move/rename file | | May break imports and references |
XcodeRMXcodeMV| 操作 | 工具 | 风险 |
|---|---|---|
| 删除文件/目录 | | 不可逆——先与用户确认 |
| 移动/重命名文件 | | 可能破坏导入和引用关系 |
XcodeRMXcodeMV| Scenario | Use MCP | Use Standard (Read/Write/Grep) |
|---|---|---|
| Files in the Xcode project view | Yes — includes generated/resolved files | May miss generated files |
| Files outside the project | No | Yes — standard tools work everywhere |
| Need build context (diagnostics after edit) | Yes — edit + rebuild in one workflow | No build integration |
| Simple file read/edit | Either works | Slightly faster (no MCP overhead) |
| 场景 | 使用MCP | 使用标准工具(Read/Write/Grep) |
|---|---|---|
| Xcode项目视图中的文件 | 是——包含生成文件/已解析的包 | 可能会遗漏生成文件 |
| 项目外的文件 | 否 | 是——标准工具可在任何地方使用 |
| 需要构建上下文(编辑后的诊断信息) | 是——在一个工作流中完成编辑+重新构建 | 无构建集成 |
| 简单的文件读取/编辑 | 两者均可 | 略快(无MCP开销) |
ExecuteSnippet(code, language: "swift")ExecuteSnippet(code, language: "swift")XcodeListWindowsXcodeListWindowsXcodeWriteXcodeUpdateXcodeWriteXcodeUpdateXcodeWriteXcodeUpdateXcodeWriteXcodeUpdatecontentstructuredContentoutputSchemaoutputSchemacontentstructuredContentXcodeUpdateXcodeUpdate| Thought | Reality |
|---|---|
| "I'll just use xcodebuild" | MCP gives IDE state + navigator diagnostics + previews that CLI doesn't |
| "Read tool works fine for Xcode files" | |
| "Skip tab identifier, I only have one project" | Most tools fail silently without |
| "Run all tests every time" | |
| "I'll parse the build log for errors" | |
| "XcodeWrite to update a file" | |
| "One tool call is enough" | Workflows (BuildFix, TestFix) use loops. Isolated calls miss the iteration pattern. |
| 错误想法 | 实际情况 |
|---|---|
| "我直接用xcodebuild就行" | MCP提供了CLI不具备的IDE状态、导航器诊断信息和预览功能 |
| "读取工具处理Xcode文件没问题" | |
| "跳过标签标识符,我只有一个项目" | 大多数工具在没有 |
| "每次都运行所有测试" | 迭代时用 |
| "我直接解析构建日志找错误" | |
| "用XcodeWrite更新文件" | 编辑文件用 |
| "一次工具调用就够了" | 工作流(BuildFix、TestFix)使用循环。孤立调用无法实现迭代模式。 |