How to use VSCode/Cursor for iOS development
Article Summary
What if you could ditch Xcode's sluggish editor and use VSCode/Cursor for iOS development? Turns out, you can build a surprisingly functional setup.
This guide walks through configuring VSCode or Cursor as your primary editor for iOS projects while keeping Xcode for builds and debugging. It's a practical workaround for developers frustrated with Xcode's editor performance but still needing its build toolchain.
Key Takeaways
- Use SourceKit-LSP extension for Swift autocomplete and syntax highlighting in VSCode
- Configure tasks.json to trigger Xcode builds directly from VSCode shortcuts
- Set up file watchers to auto-sync changes between editors seamlessly
- Leverage Cursor's AI features for iOS code while maintaining Xcode compatibility
You can use VSCode/Cursor for editing iOS code while delegating builds and debugging to Xcode, gaining editor speed without abandoning Apple's toolchain.
About This Article
Thomas Ricouard wanted to speed up development on his open-source SwiftUI Mastodon client Ice Cubes. He thought AI-assisted coding could help him work faster than traditional Xcode editing alone.
He set up Cursor with the Sweetpad extension, Xcode Build Server, xcbeautify, and SwiftFormat. This gave him AI-powered autocompletion that indexes the project for custom embeddings, inline code generation with CMD+K, and a built-in chat for discussing architecture.
Cursor's AI Tab feature got so good at predicting his next edits that he could just press tab to accept suggestions. This let him build features much faster while keeping his code style consistent across the project.