Beyond ChatGPT: How to Use Claude and Gemini in Xcode Coding Intelligence

Published on June 25, 2025


Apple’s new Swift Assist, uh, I mean coding intelligence is finally here, and it’s built right into Xcode. It’s a powerful, integrated coding partner powered by OpenAI’s ChatGPT models. ChatGPT is plenty capable, but if you sign in with a personal account, your requests may be used to train their models. I’m someone who values privacy, so I’m happy Apple’s allowing us to use other third-party model providers, such as Claude or Gemini.

ChatGPT Privacy in Xcode

So, whether you’re looking for maximum privacy, need to meet a company policy, or just prefer the output from Claude or Gemini, the good news is you’re not locked in. This guide walks you through exactly how to integrate both Claude and Gemini directly into Xcode.


How to Configure Anthropic’s Claude Models

Getting Claude set up is very simple since Anthropic’s API is already compatible with what Xcode expects. No tricky rewrites or workarounds needed.

Step 1: Add the Model Provider in Xcode

First, navigate to the Xcode settings panel to add Anthropic as a recognized provider.

  1. Go to Xcode → Settings.
  2. Select the Intelligence tab.
  3. Select “Add Model Provider…”
  4. In the configuration sheet that appears, enter the following details:
    • URL: https://api.anthropic.com/
    • API Key: Paste in your personal Anthropic API key.
    • API Key Header: x-api-key (default)
    • Description: Anthropic (or your preferred label)

Step 2: Verify the Configuration

Once saved, the provider is ready. Open the Coding Assistant in Xcode, start a New Conversation, and you should now see “Anthropic” as an option. Selecting it will display the available Claude models tied to your API key, including Claude 4 Sonnet, Opus, and others.


How to Configure Google’s Gemini Models Using Proxyman

Gemini isn’t natively supported in Xcode, so we’ll need a quick workaround. Fortunately, it’s straightforward when using a local proxy tool such as Proxyman, which lets us intercept and rewrite requests in real time.

A quick shoutout: Full credit for this solution goes to Carlo Zottmann, who first documented the entire process. His detailed post explains why this proxy method is necessary and provides even deeper technical context.

You can find his excellent guide here: How to use Google Gemini in Xcode 26 beta

Here is the full, step-by-step process.

Step 1: Add the Gemini Model Provider in Xcode

First, you need to add Google’s API as a model provider in Xcode’s settings, even though the connection won’t fully work until Proxyman is set up.

  1. Navigate to Xcode → Settings → Intelligence.
  2. Select “Add Model Provider…”
  3. Use the following settings:
    • URL: https://generativelanguage.googleapis.com/
    • API Key: Bearer <YOUR_GEMINI_API_KEY>
    • API Key Header: Authorization
    • Description: Gemini (or a custom label)

Step 2: Set Up Proxyman for SSL Proxying

Next, configure Proxyman to intercept and decrypt the traffic between Xcode and Google’s API.

  1. Download, install, and launch Proxyman.
  2. From the menu bar, go to Certificate → Install Certificate on this Mac and follow the prompts to install and trust it. This is a critical step that allows Proxyman to decrypt HTTPS traffic.
  3. Enable SSL Proxying specifically for the Gemini API domain. You can do this by finding a request to generativelanguage.googleapis.com in the traffic list, right-clicking it, and selecting “Enable SSL Proxying for this domain.”
Step 3: Add the Request-Rewriting Script to Proxyman

We will use Proxyman’s scripting feature to modify the request path to match what the Gemini API expects.

  1. In Proxyman, go to Scripting → Script Lists…
  2. Check the box to “Enable Scripting Tool
  3. Click the + icon to add a new script.
  4. Set the Matching Rule to match the specific URL path: https://generativelanguage.googleapis.com/v1/.
  5. Check the box to “Include all subpaths of this URL
  6. Paste the following JavaScript code into the request-handling function:
  7. Click Save & Activate

This script finds any request going to the /v1/ path and changes it to /v1beta/openai/ before sending it to Google’s servers.

Important: A script will not run while it’s being edited. After adding your code, ensure the script is both saved and active for it to take effect.

Step 3: Relaunch Xcode and Verify the Connection

With all the pieces in place, it’s time to verify the setup.

  1. Completely quit and relaunch Xcode to ensure it picks up the new proxy settings.
  2. Go back to Settings → Intelligence.
  3. Select your Gemini provider from the model dropdown.

If the configuration is successful, the assistant panel will populate with a list of available Gemini models, such as gemini-2.5-flash and gemini-2.5-pro.

A cool bonus is that you can use Proxyman to inspect the API calls and see what prompts Xcode is sending to the APIs.


Xcode’s Coding Assistant vs Alex

For a while now, I’ve been using a third-party tool called Alex (or Alex Sidebar). It’s a separate application that hooks into Xcode and, on paper, it’s a more powerful tool. It has more features, broader model support out-of-the-box, and more advanced options for project-wide refactoring.

But as a separate app, it always felt just a bit… detached. Switching back and forth between Xcode and Alex added friction.

This is where the new native Xcode Coding Assistant wins. Even if it’s missing a few advanced features (for now), it feels like part of the editor. No context switching. No awkward integrations. It’s smooth and I expect the native assistant to replace a couple of the existing third-party apps.

So, Which Model Should You Use?

Now that we can switch between ChatGPT, Claude, and Gemini right from Xcode, there’s a bigger question: Which one is actually best for iOS dev work?

Each model has strengths, but which one excels at writing Swift, refactoring SwiftUI views, or debugging complex async logic?

 That’s what I’ll be diving into next. Stay tuned for a detailed, head-to-head comparison.

Let's Connect

I'm always interested in discussing AI, iOS development, or potential collaboration opportunities. Feel free to reach out!


Get in Touch