Join the waitlistDownload

Cursor for SwiftUI. How to build an iOS app in Cursor

What Cursor can do with an iOS project, what stays in Xcode, how to set up builds and the simulator, which rules to give the agent and what it costs after the October 2026 pricing change.

In short

You can write a SwiftUI iPhone app in Cursor, but Xcode on a Mac builds it. Cursor's official guide recommends the Swift and Sweetpad plugins and xcode-build-server, so builds, the simulator and debugging start right from the editor. Agent rules live in .cursor/rules, and Cursor gets SwiftUI Preview snapshots through Xcode 26.3 or later tools (Cursor, October 17, 2026).

What Cursor can do with an iOS project

Cursor writes and edits Swift and SwiftUI like any other code. The agent opens with Cmd+I, and plan mode toggles with Shift+Tab. But the compiler, the iOS SDK, the simulator and code signing only exist in Xcode, so you can't build an iPhone app in Cursor without a Mac. Cursor says so itself in its Swift guide (cursor.com, October 17, 2026).

Cursor's cloud agents run on Ubuntu, with no Xcode. To build, you can give them your own Mac as an agent machine (docs). Cursor also has an iPhone app for iOS 26 and later, where you drive cloud agents (docs).

What Cursor does and what stays in XcodeWhat Cursor does and what stays in Xcode in a SwiftUI iPhone project. Writing and editing SwiftUI: Cursor itself, Xcode with its chat assistant. Rules for the agent: Cursor's .cursor/rules folder and AGENTS.md, Xcode's own agent settings. Build: Cursor via Sweetpad and xcodebuild, Xcode itself. Simulator and debugging: Cursor with F5 via Sweetpad, Xcode itself. SwiftUI Preview: Cursor gets a snapshot through Xcode 26.3 or later tools, Xcode renders it itself. Signing and upload to App Store Connect: Xcode only. From Cursor's guide and Xcode integration docs, October 17, 2026.What Cursor does and what stays in XcodeA SwiftUI iPhone project. Cursor's guide and Xcode integration docs, October 17, 2026CursorXcodeWrite and edit SwiftUIagent and completionsRules for the agentBuildSimulator and debuggingSwiftUI PreviewSigning and App Store Connectuploaditselfassistant in chat.cursor/rules, AGENTS.mdits own agent settingsvia Sweetpad and xcodebuilditselfF5 via Sweetpaditselfsnapshot via Xcode 26.3+ toolsitselfnoitselfdoes it itselfvia Sweetpad or Xcodeno
Writing code is comfortable in Cursor, but the compiler, previews and signing stay in Xcode, so you need a Mac. Cursor's iOS and macOS guide, October 17, 2026.

Setting up builds and the simulator

  1. Xcode. Install Xcode from the Mac App Store and open it once so it installs its components.
  2. Tools from Homebrew. brew install xcode-build-server xcbeautify swiftformat. The first connects the Xcode project to code intelligence, the second makes build output readable, and the third formats code.
  3. Plugins in Cursor. Swift Language Support for highlighting and completions, and Sweetpad for building and running.
  4. Build config. The Sweetpad: Generate Build Server Config command creates a buildServer.json file, after which Cursor understands the project's types and errors.
  5. Run. F5 builds the app, installs it in the simulator and attaches the debugger.
Setting up Cursor for iOS in five stepsSetting up Cursor for iOS in five steps, from Cursor's official guide. 1. Xcode on a Mac from the Mac App Store, opened once. 2. Homebrew: xcode-build-server, xcbeautify, swiftformat. 3. The Swift Language Support and Sweetpad plugins. 4. A buildServer.json file via Sweetpad: Generate Build Server Config. 5. Run with F5: build, simulator and debugger. Checked October 17, 2026.Setting up Cursor for iOS in five stepsFrom Cursor's official iOS and macOS guide, checked October 17, 202612345Xcode on aMacHomebrewPluginsbuildServer.jsonRun with F5From the MacApp Store, openit oncexcode-build-server,xcbeautify,swiftformatSwift LanguageSupport andSweetpadSweetpad:Generate BuildServer ConfigBuild, simulatorand debugger
Step four is the key one, since after buildServer.json Cursor understands the Xcode project's types and errors. Cursor's guide, October 17, 2026.

From Cursor's iOS and macOS guide, checked October 17, 2026. Sweetpad has 1,910 stars on GitHub, latest release October 10, 2026 (GitHub), and xcode-build-server has 1,009 stars, version 1.3.0 from January 5, 2026 (GitHub).

Sweetpad now also ships as a terminal tool. sweetpad run builds and launches the app on the chosen simulator, which helps when the agent runs the build.

Cursor rules for SwiftUI

Rules tell the agent how your project works. In Cursor they live in the .cursor/rules folder, one file per topic, in the .mdc format with a three-field header (Cursor docs). A plain .md file in that folder is ignored, while an AGENTS.md file in the project root is picked up.

---
description: SwiftUI rules for this app
globs: **/*.swift
alwaysApply: true
---
- Native iPhone app in SwiftUI, iOS 18 and later.
- UIKit only where SwiftUI can't do it.
- State through @Observable, no third-party packages.
- After a change, build with Sweetpad and check the screen in the simulator.
- For Liquid Glass and StoreKit, check the docs that ship with Xcode.

The globs field limits the rule to Swift files, and alwaysApply keeps it on for every task. The last line matters more than it looks. Models know the newest iOS frameworks poorly, and Xcode keeps documentation for its own assistant inside the app. In Xcode 27.0 that's 20 Markdown files, including Liquid Glass and StoreKit (checked on our Mac on October 17, 2026). Give the agent the path to them.

Cursor and Xcode together

The most comfortable setup for SwiftUI is Cursor for code and Xcode for previews and shipping. Since Xcode 26.3, Cursor can connect Xcode's own tools with xcrun mcpbridge. That's 20 tools, including building the project, running tests and a SwiftUI Preview snapshot. It needs a paid Cursor plan, and Xcode must be running with the project open (Cursor docs).

Without it, previews only show in Xcode itself. Signing, archiving and uploading to App Store Connect are also easier in Xcode or with an agent in the terminal. If you want an agent to handle all of that, look at Claude Code and Codex, compared with Cursor in AI for iOS coding.

What Cursor costs in October 2026

Cursor changed owner and pricing this fall. SpaceX acquired Cursor on August 14, 2026 (Cursor blog), and since October 12 new customers buy Cursor as part of The X Subscription.

PlanPer monthWhat you get
Free$0the editor's basic features
Plus$8Grok models only, no cloud agents
Premium$30cloud agents, Bugbot, Claude and GPT models at provider prices on top
Super$100a larger shared weekly limit
Ultra$200a larger limit still

From Cursor's pricing page, checked October 17, 2026. Billed yearly, Plus is $80 and Premium $300. Older plans such as Pro at $20 stay with existing subscribers (Cursor).

For iOS work, note that Xcode's tools in Cursor need a paid plan, and on the new plans Claude and GPT models are billed separately from the subscription.

Where Appto fits

Cursor is an editor, and the rest of the path to the App Store is up to you. The niche, the App Store page in every language, App Store Connect and sales after launch.

Appto works with Claude Code and Codex on your own subscription and takes the app from niche to the App Store. The agent writes code in a regular Xcode project that lives in your repository, so you can open it in Cursor too. Appto walks every screen in the simulator itself, builds the App Store page in every language and fills in App Store Connect, asking for your OK before each change. More in How to build an iOS app with AI.

Questions

Can you build an iOS app in Cursor?

You can write the code. Building, running in the simulator and uploading to the App Store go through Xcode on a Mac, which Cursor drives via the Sweetpad plugin or Xcode's tools.

Can Cursor be used with Xcode?

Yes. Since Xcode 26.3 Cursor connects 20 Xcode tools, including build, tests and SwiftUI Preview snapshots, on a paid plan with Xcode open.

Where do Cursor rules for SwiftUI go?

In the .cursor/rules folder, as .mdc files with description, globs and alwaysApply fields. Cursor also reads an AGENTS.md file in the project root.

How much does Cursor cost?

Since October 12, 2026, new customers get Free, Plus at $8, Premium at $30, Super at $100 and Ultra at $200 a month. Claude and GPT models are billed on top.

Is there a Cursor app for iOS?

Yes, for iOS 26 and later. It drives Cursor's cloud agents, but it doesn't build iOS apps on the phone.

Build your own app in Appto

Appto checks the niche on fresh App Store data, designs the screens, writes the code, builds the App Store page and submits to Apple from your account or shows you what to press in App Store Connect. Runs on your own Claude Code or Codex.

Download for Mac