How to Build iOS & macOS Apps in VS Code (Cursor/Windsurf) with Claude Code & SweetPad

I wanted to use Cursor/VS Code with Claude Code so I could get LLM power inside my editor and build apps the way I do for Python and web stuff.
But iPhone (and Mac) development requires Xcode, and Xcode doesn’t have built-in support for LLM help (yet). I’d heard people were doing this with Cursor and Xcode, but I wasn’t sure how.
Here’s how I got it working, plus a bonus on theming VS Code to look like Xcode.
This setup includes
- Homebrew tools:
xcode-build-server
,xcbeautify
, andswiftformat
- SweetPad extension for VS Code to bridge to Xcode’s CLI
- Claude Code inside VS Code (or any fork like Cursor, Windsurf, etc.) for LLM-assisted coding
- Bonus theme: Xcode 12 color scheme for a familiar look
Setting up VS Code to talk to XCode
Step 1: Ensure Xcode is installed and set up
- Download Xcode from the App Store
- Open Xcode once to accept the license and install command-line tools
Step 2: Install required tools via Homebrew:
# Builds your projects without needing Xcode open
brew install xcode-build-server
# Pretty prints the xcodebuild command output into Cursor's terminal
brew install xcbeautify
# Allows for advanced formatting and language features
brew install swiftformat
Step 3: Install SweetPad extension in Cursor
- Open Cursor
- Go to Extensions
- Search for and install “SweetPad”
- Link: https://marketplace.visualstudio.com/items?itemName=swiftlang.swift-vscode
Step 4: Create your initial iOS app in Xcode
- Open Xcode
- Create a new iOS app project with SwiftUI
- Save the project and close Xcode
Step 5: Open project in Cursor and configure
- Open the
.xcodeproj
file in Cursor - Press CMD+SHIFT+P and run SweetPad: Generate Build Server Config (buildServer.json)
- This creates the
buildServer.json
configuration file that tells Cursor how to talk to Xcode
- This creates the
Running the App from VS Code
- Press CMD+SHIFT+P and run SweetPad: Build & Run (Launch)
- A new terminal pane opens and runs the Xcode CLI commands
- The iOS Simulator will launch (it might pop up behind your Cursor window—check your dock or hit CMD+Tab)
Making changes
- Edit your Swift files directly in Cursor
- Hit CMD+SHIFT+P → SweetPad: Build & Run (Launch) again to rebuild and see your updates
Bonus: Give VS Code an Xcode Look
Want VS Code to feel more like Xcode? Install the official Xcode 12 theme:
- In VS Code, open Extensions, and search for “Xcode Theme”. Here's one I went for.
- Install it, then go to Preferences → Color Theme and select the theme.
Now I can keep using Cursor + Claude Code for every step of my iPhone workflow—getting LLM hints as I code and iterating quickly, just like I do with my Python and web projects.