How to Get Sweetpad to Recognize Xcode Project Files in Build Directories
I ran into an issue while trying to use Sweetpad with an Xcode project that was being generated into a build/ directory by CMake.
I wanted to be able to hit Cmd+Shift+B in Sweetpad and have it run the project using one of the defined Xcode schemes.
But because the .xcodeproj was being placed inside build/ — not the root folder — Sweetpad kept failing with errors like:
ENOENT: no such file or directory, open '...project.xcworkspace/contents.xcworkspacedata'
✅ Here’s how I got it working:
- Create a .vscode folder at the root of the source project (not in build/).
- Inside that, add a settings.json file with this content:
{
"sweetpad.workspacePath": "build/PlunderTube.xcodeproj",
"sweetpad.build.configuration": "Debug",
"sweetpad.build.scheme": "PlunderTube",
"sweetpad.build.sdk": "macosx"
}
- Reset Sweetpad’s cache via the command palette (Cmd+Shift+P → Sweetpad: Reset Extension Cache).
- Rebuild the project in CMake.
- Then…Cmd+Shift+B worked to rebuild the project.
Now Sweetpad recognizes the generated .xcodeproj and lets me build and run the Xcode scheme as expected, directly from the VS Code interface — even though everything lives inside a build/ directory.