<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ferry Dwianta P on Medium]]></title>
        <description><![CDATA[Stories by Ferry Dwianta P on Medium]]></description>
        <link>https://medium.com/@ferrydwianta?source=rss-eb5b2d4e3c5f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*p3QxCzo9qAL93hyy_4cgOQ.jpeg</url>
            <title>Stories by Ferry Dwianta P on Medium</title>
            <link>https://medium.com/@ferrydwianta?source=rss-eb5b2d4e3c5f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 03:07:21 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ferrydwianta/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[If You Code iOS With Claude Code, Add This Before Your Next Session]]></title>
            <link>https://medium.com/@ferrydwianta/if-you-code-ios-with-claude-code-add-this-before-your-next-session-ae2af7298b5e?source=rss-eb5b2d4e3c5f------2</link>
            <guid isPermaLink="false">https://medium.com/p/ae2af7298b5e</guid>
            <category><![CDATA[mcps]]></category>
            <category><![CDATA[xcode]]></category>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[ios-development]]></category>
            <dc:creator><![CDATA[Ferry Dwianta P]]></dc:creator>
            <pubDate>Mon, 25 May 2026 06:21:14 GMT</pubDate>
            <atom:updated>2026-05-27T09:57:05.093Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QCzNm4VZ4bunF0XCxuVoGQ.png" /></figure><p>I’m an iOS developer, and like a lot of you right now, I’m pretty heavy into AI-assisted coding. These days I’m mainly on Claude Code.</p><p>After Xcode 26.3 came out, I tried the Xcode’s built-in Claude agent. It was convenient. Right there in the IDE, able to render previews directly, aware of my project structure, warnings, and others.</p><p>But I kept finding myself back in the terminal. Xcode runs the same Claude Agent SDK under the hood, so the capability is largely shared, but inside the IDE it’s sandboxed, and my whole workflow already lives in the terminal. So I stayed.</p><p>And immediately lost things I didn’t realize I’d miss.</p><p>Claude Code couldn’t render SwiftUI previews. It couldn’t see the warnings in my Issue Navigator. It couldn’t search Apple’s developer documentation without hitting the web. It read my Swift files just fine, but it was blind to everything Xcode knows that isn’t a text file.</p><p>So I became the middleman. Claude Code would do its work, mostly UI slicing and integration, and I’d run the app to check the simulator. If something was off, I’d fix it by hand or screenshot it back for Claude to iterate on. And since it couldn’t see the Issue Navigator, warnings quietly piled up while we worked.</p><p>The whole point of an AI coding assistant is to shorten feedback loops. I was making them longer.</p><p>But then I realized Xcode 26.3 had shipped with a built-in MCP server, too.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k71qJq5Uzt9iorToGQrb5g.png" /></figure><h4>What changed</h4><p>MCP (Model Context Protocol) is an open standard that lets AI tools talk to external systems. With Xcode 26.3, Apple added an MCP server that exposes your project, your builds, your diagnostics, and your previews to any MCP-compatible client.</p><p>One command in Terminal, and Claude Code gets direct access to your running Xcode instance:</p><pre>claude mcp add --transport stdio xcode -- xcrun mcpbridge</pre><p>That’s the whole setup. With Xcode open and MCP access enabled, Claude Code can now use Xcode’s tools to build the project, inspect Issue Navigator warnings, render SwiftUI previews, and search Apple documentation. No window switching.</p><p>The MCP server is open to any compatible client, so if you’re on Codex instead, it’s the same one-liner:</p><pre>codex mcp add xcode -- xcrun mcpbridge</pre><p>To verify the configuration, run claude mcp list (or codex mcp list) in Terminal. You should see the xcode server listed.</p><p>Two quick prerequisites: you need Xcode 26.3 or later (that’s where xcrun mcpbridge ships), and a recent macOS. Apple lists 15.6 as the minimum, but the agent features lean newer, so if the bridge won&#39;t start, check your OS version first.</p><p><a href="https://developer.apple.com/documentation/xcode/giving-external-agents-access-to-xcode">Giving external agents access to Xcode | Apple Developer Documentation</a></p><h4>Making Claude Code actually use it</h4><p>Installing the MCP is step one. Step two is telling Claude Code when to reach for these tools instead of falling back to xcodebuild or web search. I added this to my project&#39;s CLAUDE.md:</p><pre>## Build &amp; Run<br><br>Prefer the **Xcode MCP** (`mcp__xcode__*`) for all build, test, and preview<br>operations. It talks to the running Xcode instance directly.<br><br>| Task | MCP Tool |<br>|------|----------|<br>| Build | `mcp__xcode__BuildProject` |<br>| Run all tests | `mcp__xcode__RunAllTests` |<br>| Run specific tests | `mcp__xcode__RunSomeTests` |<br>| SwiftUI preview | `mcp__xcode__RenderPreview` |<br>| Build log | `mcp__xcode__GetBuildLog` |<br>| Navigator issues | `mcp__xcode__XcodeListNavigatorIssues` |<br>| Apple docs | `mcp__xcode__DocumentationSearch` |<br>| Create file (auto-adds to project) | `mcp__xcode__XcodeWrite` |</pre><p>Without this, Claude Code will sometimes fall back to xcodebuild via Bash, or web-search for Apple documentation. The CLAUDE.md table closes that gap.</p><blockquote><strong>Note:</strong> That mcp__xcode__ prefix comes from the name you gave the server in the setup command (...mcp add ... xcode ...). If you named it something else, swap the prefix in the table to match.</blockquote><h3>The features I actually use</h3><h4>Reading warnings directly</h4><p>Before MCP, a common option for compiler diagnostics was running xcodebuild and parsing thousands of lines of raw output. Slow (cold build every time), noisy, and in my experience it didn&#39;t reliably surface things like asset catalog warnings.</p><p>With XcodeListNavigatorIssues, Claude Code gets the exact same warnings you see in Xcode&#39;s Issue Navigator, every type, structured as JSON with file path, line number, and severity. Not just compiler errors: asset catalog issues, concurrency diagnostics, deprecations, package resolution, all of it.</p><p>A while back, when my codebase had drifted into a pile of warnings, I asked Claude Code to list them. It came back with 13 issues, neatly categorized by type, each with the exact file and line number. It could have fixed them right there.</p><p>That feedback loop used to need me in the middle. Warning appears, I copy it, I paste it into the terminal, Claude fixes it. Now the agent sees the warnings and fixes them on its own.</p><h4>Rendering previews from the terminal</h4><p>This was the big one I missed from Xcode’s built-in agent. When Claude’s agent lives inside Xcode, it can render your SwiftUI previews directly. When you’re in the terminal, that capability simply doesn’t exist.</p><p>Or it didn’t.</p><p>With RenderPreview, Claude Code builds and renders any #Preview macro in your project and gets back a snapshot image. The same output you&#39;d see in Xcode&#39;s Canvas, accessible right from the terminal.</p><p>Here’s why it matters. When you’re doing UI work, like slicing a design or tweaking layout, the old way meant screenshotting the result and pasting it into the chat for every iteration. With MCP, Claude makes the change, renders the preview, sees the result, and iterates. One loop. No window switching, no screenshots, no copy-paste.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ye2Jr2EvS66nLgR7tHKL8Q.png" /><figcaption>XCode Claude Agent RenderPreview</figcaption></figure><h4>Documentation: local, not web</h4><p>A small one, but it adds up. Without MCP, when Claude Code needs to look up an Apple API, it has to web-search. Slower, and dependent on a connection.</p><p>With DocumentationSearch, it queries Apple&#39;s developer documentation through Xcode&#39;s own tooling rather than a generic web search. You give it a query (with optional framework filtering) and it returns ranked results: titles, short summaries, and documentation paths that you can look up in Xcode’s doc viewer. I searched &quot;Observable macro&quot; and got the relevant Observation framework pages back, scored by relevance, so the agent can pull the right reference without leaving the terminal or guessing at a URL.</p><h3>All 20 tools</h3><p>Here’s the full list xcrun mcpbridge exposed for me as of Xcode 26.3. Apple may add, rename, or drop tools in later releases, so treat this as a snapshot rather than a fixed spec, and check your own tools/list output if you need the current set. Skim it, or skip to the next section.</p><h4><strong>Build &amp; Test</strong></h4><ul><li><strong>BuildProject</strong>: Builds the project and waits until complete. Returns structured errors with file paths and line numbers.</li><li><strong>RunAllTests</strong>: Runs all tests from the active scheme&#39;s test plan. Returns pass/fail counts and console logs.</li><li><strong>RunSomeTests</strong>: Runs specific tests by target and identifier. Use GetTestList first to discover test IDs.</li><li><strong>GetTestList</strong>: Lists all available tests: target, identifier, file path, line number, tags, enabled status.</li></ul><h4><strong>Diagnostics &amp; Logs</strong></h4><ul><li><strong>XcodeListNavigatorIssues</strong>: Issues from Xcode&#39;s Issue Navigator, filterable by severity, glob, regex.</li><li><strong>GetBuildLog</strong>: Build log entries filterable by severity, regex pattern, or file glob.</li><li><strong>XcodeRefreshCodeIssuesInFile</strong>: Compiler diagnostics for a single file.</li></ul><h4><strong>Preview &amp; Docs</strong></h4><ul><li><strong>RenderPreview</strong>: Renders a SwiftUI #Preview and returns a snapshot image. Supports timeout and multi-preview index.</li><li><strong>DocumentationSearch</strong>: Semantic search of Apple Developer Documentation. Optional framework filter.</li></ul><h4><strong>Code Execution</strong></h4><ul><li><strong>ExecuteSnippet</strong>: Runs a Swift snippet in the context of a source file. Returns print output.</li></ul><h4><strong>File Operations</strong></h4><ul><li><strong>XcodeRead</strong>: Reads file contents with line numbers. Supports offset/limit for large files.</li><li><strong>XcodeWrite</strong>: Creates or overwrites files. Auto-adds new files to the Xcode project.</li><li><strong>XcodeUpdate</strong>: Find and replace text in a file.</li><li><strong>XcodeMV</strong>: Move, rename, or copy files in the project navigator.</li><li><strong>XcodeMakeDir</strong>: Creates directories/groups in the project structure.</li><li><strong>XcodeRM</strong>: Removes files from project, optionally trashes from disk.</li></ul><h4><strong>Search &amp; Navigation</strong></h4><ul><li><strong>XcodeGrep</strong>: Regex search across project files with context lines, case options, and output modes.</li><li><strong>XcodeGlob</strong>: Find files by wildcard pattern, sorted by most recently modified.</li><li><strong>XcodeLS</strong>: Lists project structure at a path.</li><li><strong>XcodeListWindows</strong>: Lists open Xcode windows. Returns the tabIdentifier needed by most other tools.</li></ul><blockquote><strong>Note: </strong>XcodeWrite adds new files to your Xcode project automatically. Mostly useful on older projects where files are listed in project.pbxproj, since synchronized folders (default since Xcode 16) already pick up new files on their own.</blockquote><h4>What I’d tell someone setting this up today</h4><ol><li><strong>Check your macOS version.</strong> Xcode 26.3 requires macOS Sequoia 15.6 or later, but the agentic features may need macOS 26.2 (and possibly Apple Silicon). If xcrun mcpbridge won&#39;t start, that&#39;s the first thing to check.</li><li><strong>You need Xcode open, with the project you want the agent to work on.</strong> The MCP server bridges into the running Xcode process. No Xcode, no tools.</li><li><strong>Mind the permissions.</strong> Xcode 26.3 added a permissions system that controls what external agents can do in your environment. If a tool call gets blocked, check there.</li><li><strong>Mind the permissions.</strong> The first time Claude Code connects, and at the start of each session, Xcode pops up a prompt asking you to allow the agent access to its tools (building, testing, modifying code). You have to click Allow before the MCP tools will work.</li><li><strong>Add the </strong><strong>CLAUDE.md table.</strong> Without explicit instructions, Claude Code doesn&#39;t always prefer MCP tools over its defaults.</li><li><strong>XcodeListWindows runs first.</strong> Almost every tool needs a tabIdentifier to know which Xcode window to act on (18 of the 20, in fact), and XcodeListWindows is what provides it. Claude Code calls it automatically before anything else, so you won&#39;t deal with it directly, but it&#39;s worth knowing what&#39;s happening under the hood.</li><li><strong>Consider XcodeBuildMCP too.</strong> Apple’s MCP requires Xcode to be open. <a href="https://github.com/cameroncooke/XcodeBuildMCP">XcodeBuildMCP</a> (open source) wraps xcodebuild and works headless, useful for CI, or when you don&#39;t want Xcode eating your RAM. The two complement each other.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZzwI6jg6g4N6806jedtl3w.png" /><figcaption>Xcode’s permission alert</figcaption></figure><h4>Where this leaves me</h4><p>I switched to Claude Code for the way it fits my workflow. What I gave up were the things that made the in-IDE agent feel native. With the Xcode MCP, I stopped having to choose.</p><p>The agent writes the code, builds it, reads the warnings, renders the preview, and iterates, without me providing screenshots and error logs between two windows.</p><p>That back-and-forth is gone now. Claude Code just sees what Xcode sees.</p><h4>References</h4><ul><li><a href="https://developer.apple.com/documentation/xcode/giving-external-agents-access-to-xcode">Giving external agents access to Xcode | Apple Developer Documentation</a></li><li><a href="https://bleepingswift.com/blog/xcode-mcp-server-ai-workflow">How to Use Xcode&#39;s MCP Server to Build Xcode into Your AI Workflow</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ae2af7298b5e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>