Using AI IDE for Swift/SwiftUI Development
Learn how to use AI IDE for Swift/SwiftUI development, say goodbye to Xcode
You can use popular AI IDEs available in the market to develop Swift/SwiftUI projects. You can experience all the features of AI IDEs while still relying on Xcode to build and run your applications.
Xcode is the foundation for building/running apps, you still need to install Xcode.
Next, we'll use Cursor as an example to introduce how to use AI IDE for Swift/SwiftUI development.
Using Sweetpad for Swift/SwiftUI Development
If you want to open only one editor at a time and avoid the need to switch between Xcode and Cursor, you can use extensions like Sweetpad to integrate Cursor directly with Xcode's underlying build system.
Sweetpad is a powerful extension that allows you to build, run, and debug Swift projects directly in Cursor without compromising Xcode's functionality.
Open terminal and run:
# Build projects without opening Xcode
brew install xcode-build-server
# Beautify and print `xcodebuild` command output to Cursor's terminal
brew install xcbeautify
# Swift/SwiftUI code formatting
brew install swiftformatNext, install the Swift Language Support plugin in Cursor. This will provide you with syntax highlighting and basic language features out of the box.
Then, we can install the Sweetpad plugin to integrate Cursor with Xcode. Sweetpad wraps a bunch of shortcuts around the xcodebuild CLI (and more features) and allows you to scan simulators/real devices, select devices, build and run applications, just like Xcode. Additionally, it will set up Xcode Build Server for your project so you get all the above features.
Using Sweetpad
After installing Sweetpad, open the EasyApp project in Cursor and first run the Sweetpad: Generate Build Server Config command. This will generate a buildServer.json file in the project root directory, allowing Xcode Build Server to work with your project.
If you still have issues after performing the above steps, such as code errors, you can re-execute Reload Window to resolve this problem.

Select the default build project
1: Click here

2: Select the default build project

Then, from the command palette or Sweetpad sidebar, you can select the simulator/real device you want to build and run on.
For more Sweetpad information, please refer to:
Hot Reload
The current hot reload experience is not perfect yet. There are still some issues. This can be used as an alternative option, but we mainly recommend using Xcode Preview to preview your App.
When working with Xcode workspaces or projects (rather than opening folders directly in Xcode), Xcode may typically ignore changes made to files in Cursor or outside of Xcode. While you can open folders in Xcode to resolve this issue, you may need to use projects for Swift development workflows.
A great solution is to use Inject, a hot reload library for Swift that allows your application to "hot reload" and update immediately after live changes. This is not affected by the side effects of Xcode workspace/project issues and allows you to make changes in Cursor and immediately reflect them in your application.
llms.txt and llms-full.txt (Recommended)
This site supports using llms.txt and llms-full.txt.
llms-full.txt contains all documentation content, while llms.txt contains a subset. Using these llms files can improve the accuracy of Cursor's AI model responses. They help the AI better understand the project context and code style/conventions, so during Vibe coding the generated code is less likely to go off track.
llms-full.txt contains more content than llms.txt, so when inputting into the AI context, it generally exceeds the context limit and gets truncated. Therefore, in most cases, we recommend using llms.txt.
There are several ways to use them:
1. Quick Use
In the chat window, enter the following content and Cursor will use EasyApp's llms.txt/llms-full.txt.
@web https://www.easyapp.site/llms.txtOr use llms-full.txt:
@web https://www.easyapp.site/llms-full.txt2. Permanent Setup
- Press ⌘ CMD + ⇧ Shift + P
- Type "Add new custom docs"
- Add the following content:
https://daisyui.com/llms.txt Or:
https://www.easyapp.site/llms-full.txt- Now in the chat window, you can type
@docsand select EasyApp to provide EasyApp documentation for Cursor
3. Project-Level Permanent Setup
Now EasyApp template supports project-level permanent setup, which you can view in the root directory .cursor/rules.
Apple Docs MCP (Recommended Installation)
Apple Docs MCP - Access Apple's official development documentation, frameworks, APIs, SwiftUI, UIKit, and WWDC videos through the Model Context Protocol. Use AI natural language queries to search iOS, macOS, watchOS, tvOS, and visionOS documentation. Get Swift/Objective-C code examples, API references, and technical guides instantly in Claude, Cursor, or any MCP-compatible AI assistant.
XcodeBuildMCP MCP (Recommended Installation)
XcodeBuildMCP - XcodeBuildMCP is a Model Context Protocol (MCP) server that exposes Xcode operations as tools and resources for AI assistants and other MCP clients. It's built with a modern plugin architecture, providing a comprehensive set of independent tools organized into directories by workflow, and offers MCP resources for efficient data access, enabling programmatic interaction with Xcode projects, simulators, devices, and Swift packages through a standardized interface.
Summary
By combining Cursor with Xcode or Sweetpad, you can get a powerful AI-assisted development environment while maintaining all the necessary tools for Swift development. Whether you choose a simple editor switching workflow or a fully integrated Sweetpad solution, Cursor can significantly enhance your Swift development experience.
Next, we recommend you read [Essential Considerations Before Development] to avoid Apple review risks.
Last updated on