Sync with Xcode
This VSCode extension enables seamless iOS development in VSCode/Cursor while maintaining live previews and navigation sync with Xcode.
Features
- Real-time synchronization between VSCode/Cursor and Xcode
- Live previews of SwiftUI views
- Automatic file navigation sync
- Intelligent dependency resolution
- Swift/iOS code completion and error detection
Prerequisites
- VSCode 1.80.0 or higher
- The following VSCode extensions:
- Swift by Swift Server Work Group
- Sweetpad by sweetpad
- XcodeSync (this extension)
- Xcode must be running with your iOS project
Status Indicators
The menu bar icon shows the current status:
- 🔍 (Magnifying glass): XCursor is disabled
- 📄❌ (Page with slash): Not connected to project
- 📄 (Page): Successfully connected and syncing
Installation & Setup
- Install all required extensions through VS Code Extensions
- Open your iOS project in Xcode
- Import the XcodeSync companion script into your Xcode project
- Configure your development environment:
- In Xcode:
- Select your run destination (for device testing)
- Press
⌥⌘T to enable compact Xcode view
- Open a file with preview and maximize the preview pane
- In VSCode/Cursor:
- Open the parent folder containing your Xcode project (including .xcodeproj)
- Press
⌘⇧P , search for "sweetpad" and select "Generate Build Server Config"
- Run "Build Without Run" command and select any device
- Wait for dependency resolution to complete
Usage
- Arrange your workspace:
- Position Xcode and VSCode/Cursor side by side
- Minimize Xcode window size while keeping preview visible
- Run the XcodeSync companion script
- Grant Accessibility permissions when prompted
- Start coding! Switch between files to see automatic sync in action
Tips for Best Experience
- Ensure your Xcode project is properly set up before starting
- Keep both Xcode and VSCode/Cursor running
- Use
⌘R in Xcode for testing on physical devices
- Watch the preview update in real-time as you code
Troubleshooting
If sync isn't working:
- Verify all extensions are installed
- Check Accessibility permissions
- Ensure build server configuration is generated
- Confirm both Xcode and VSCode/Cursor are running
Known Issues
Release Notes
0.9.0
Initial release of Sync with Xcode
- Basic file synchronization
- SwiftUI preview support
- Build server integration
| |