├── .DS_Store ├── assets └── build.png └── README.md /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/punnerud/xcode_cursor_buildtool/HEAD/.DS_Store -------------------------------------------------------------------------------- /assets/build.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/punnerud/xcode_cursor_buildtool/HEAD/assets/build.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Xcode Cursor Build Tool 2 | 3 | A specialized build script designed to integrate with Cursor AI for Xcode project builds, providing intelligent error reporting through the Cursor terminal. 4 | 5 | Just drop `build.sh` into your Xcode project root folder and ask Cursor AI (with Agent activated): "Can you build using build.sh" 6 | 7 | Build Tool Demo 8 | 9 | ## Overview 10 | 11 | This tool serves as a bridge between Cursor AI and Xcode projects, offering automated build processes with detailed error feedback directly in your Cursor terminal. 12 | 13 | ## Features 14 | 15 | - 🔍 Automatic Xcode scheme detection 16 | - 📱 Smart iOS simulator selection and management 17 | - 🔄 Intelligent build system with fallback mechanisms 18 | - ⚠️ Real-time error reporting in Cursor terminal 19 | - 🧹 Automatic clean build on initial failure 20 | 21 | ## Integration with Cursor AI 22 | 23 | 1. Add the build script to your Xcode project: 24 | - Copy `build.sh` to your project root 25 | - Ensure it's tracked in version control 26 | 27 | 2. Configure in Cursor AI: 28 | ```json 29 | { 30 | "build": { 31 | "command": "./build.sh", 32 | "path": "${workspaceFolder}" 33 | } 34 | } 35 | ``` 36 | 37 | ## Usage 38 | 39 | 1. In Cursor AI, trigger builds using: 40 | - Command Palette: `Build Project` 41 | - Keyboard Shortcut: [Your preferred shortcut] 42 | 43 | 2. View Results: 44 | - Build progress appears in Cursor terminal 45 | - Errors and warnings are highlighted inline 46 | - Click on errors to jump to relevant code 47 | 48 | ## Error Reporting 49 | 50 | The script provides detailed error feedback in the Cursor terminal: 51 | 52 | - Build failures with source location 53 | - Compiler warnings with context 54 | - Simulator and environment issues 55 | - Runtime configuration problems 56 | 57 | ## Prerequisites 58 | 59 | - macOS 60 | - Xcode installed in `/Applications` 61 | - Command Line Tools for Xcode 62 | - Cursor AI editor 63 | 64 | ## Troubleshooting 65 | 66 | Common issues and solutions: 67 | 68 | - **Build Script Permissions**: Ensure the script is executable 69 | ```bash 70 | chmod +x build.sh 71 | ``` 72 | - **Xcode Configuration**: Verify Xcode path and selected scheme 73 | - **Simulator Issues**: Check available simulators in Xcode 74 | 75 | ## Contributing 76 | 77 | Feel free to submit issues and pull requests to improve the integration between Cursor AI and Xcode builds. 78 | --------------------------------------------------------------------------------