Both Codex and Claude Code can write Swift, run builds and fix errors. For iOS work the real questions are narrower: how each one talks to Xcode, how you give it project rules, what it costs, and how it fits the way you already work. This comparison sticks to what the official docs say.
The short answer
- Xcode access is now the same. Since Xcode 26.3, both agents connect to Xcode’s tools through the same MCP bridge.
- Rules files differ in name, not idea. Claude Code reads
CLAUDE.md. Codex readsAGENTS.md. Apple’s Xcode doc mentions both. - Pricing differs in structure. Codex is included in ChatGPT plans. Claude Code needs a paid Claude plan or a Console account.
- Pick by workflow fit, not by headline benchmarks. Try both on the same task in your own repo.
How each connects to Xcode
Before Xcode 26.3, an agent working on an iOS project mostly drove xcodebuild and simctl from the terminal. That still works. But Apple’s February 2026 newsroom post says Xcode 26.3 supports “coding agents such as Anthropic’s Claude Agent and OpenAI’s Codex” and “makes its capabilities available through the Model Context Protocol.” It adds that agents can verify work by “capturing Xcode Previews and iterating through builds and fixes.”
This post focuses on the external route: you run the agent in your own terminal and connect it to Xcode through xcrun mcpbridge, as Apple’s developer doc describes.
First, in Xcode, open Settings, then Intelligence, and turn on “Allow External Agents to Use Xcode Tools.” Then:
Claude Code
claude mcp add --transport stdio xcode -- xcrun mcpbridge
claude mcp list
Codex
codex mcp add xcode -- xcrun mcpbridge
Apple’s doc gives one important instruction for both: “Before prompting an external agent (outside of Xcode), be sure to open your project in Xcode.” The bridge talks to a running Xcode.
Since both agents use the same bridge, the Xcode-specific abilities are roughly equal. The difference comes from the agent around it.
Project rules
Both tools read a Markdown file of standing instructions.
Claude Code reads CLAUDE.md. Anthropic’s cost docs suggest you “Aim to keep CLAUDE.md under 200 lines” and move specialized instructions into skills, which load only when needed.
Codex reads AGENTS.md. OpenAI’s docs describe a chain: a global file in your Codex home directory, then files from the project root down to the current directory. An AGENTS.override.md file takes precedence at the same level.
Apple’s Xcode doc notes you can add Xcode-specific hints in either AGENTS.md or CLAUDE.md. If your team uses both agents, keep one source of truth and have the other file point to it.
What to put in it for an iOS app:
- Minimum iOS version and target devices.
- Architecture rules, such as where networking and persistence live.
- Your build and test commands, with the exact scheme and destination.
- Rules on signing and secrets: the agent never edits signing settings or reads keys.
Where you run them
Claude Code runs in your terminal, in IDE integrations, and in other surfaces Anthropic lists in its docs. For iOS, the terminal plus Xcode open side by side is the common setup.
Codex comes as a CLI, an IDE extension, a cloud agent, and inside the ChatGPT apps. OpenAI’s docs list these surfaces. Cloud tasks are handy for background work like writing tests, but iOS builds need a Mac with Xcode, so check what can actually run in the cloud environment before relying on it for build verification.
Pricing
Prices change often, so read both pricing pages before deciding.
- Codex: OpenAI’s pricing page says “ChatGPT Work and Codex are included in your ChatGPT Free, Go, Plus, Pro, Business, Edu, or Enterprise plan.” You can also use an API key and “Pay for Codex usage based on API pricing.”
- Claude Code: Anthropic’s docs say it “works with any paid Claude subscription (Pro, Max, Ultra, Team, or Enterprise) or a Claude Console account.” Claude’s pricing page lists the plan prices and usage multiples.
If you already pay for one of these, start there. For a fuller breakdown of what a project costs on the Claude side, see how much it costs to build an app with Claude Code.
SwiftUI vs Flutter changes the picture
If you build native SwiftUI, Xcode access matters a lot. Previews, the build system and the test runner all live in Xcode, and the MCP bridge gives either agent a direct line to them. Our Claude Code with SwiftUI post shows the native workflow.
If you build with Flutter, Xcode matters less day to day. You run flutter run against the simulator and only open Xcode for signing and capabilities. The deciding factors become rules, skills and testing. The Dart and Flutter MCP server works with any MCP client, so both agents can use it.
How to choose
Run the same three tasks with each tool in your real project:
- A small feature. Add a screen with a list, detail view and one network call.
- A bug fix. Pick a real crash or layout bug from your backlog.
- A refactor. Move a feature into a cleaner structure without changing behavior.
For each, note how many times you had to step in, whether the build passed at the end, and whether the code followed your rules file. That tells you more than any benchmark.
Watch for these too:
- Does it ask before risky actions, like editing the project file?
- Does it check its own work with a build, test or preview?
- How fast do you reach your plan’s usage limit on a normal day?
A hybrid is fine
Some developers keep both: one as the main agent, the other for a second opinion on a tricky diff. Since both read Markdown rules and both connect to Xcode the same way, switching costs little. Keep your rules in one file and your tests strong, and either agent becomes safer to use.
Related reading
- Claude Code vs Codex for app development covers the broader, platform-neutral comparison.
- Cursor vs Claude Code for iOS compares an editor-first approach.
- The Claude Code mobile app development guide is the full workflow from idea to store.
MobileKit’s skills are written for Claude Code, so if you pick it, they give you a spec-to-store workflow out of the box.
Sources read on the day this post was written: Apple Newsroom: Xcode 26.3, Apple: Giving external agents access to Xcode, OpenAI: Codex pricing, OpenAI: Custom instructions with AGENTS.md, Claude Code docs: JetBrains IDEs, Claude Code docs: Manage costs effectively and Claude pricing.