build-swift-project
Build and test the LocalizeAR Swift project using build.sh scripts. Use this skill whenever building, testing, or cleaning the project. NEVER use xcodebuild or swift build directly - always use build.sh.
When & Why to Use This Skill
This Claude skill automates the build, test, and maintenance lifecycle of the LocalizeAR Swift project. It ensures environment consistency and prevents compiler conflicts by strictly enforcing the use of custom build scripts that prioritize Apple Clang over Homebrew-installed GCC. By mirroring CI/CD configurations, it provides a reliable and standardized development workflow for both the main library and its example applications.
Use Cases
- Standardized Project Building: Compile the LocalizeAR library in debug or optimized release modes using pre-configured scripts to ensure build reliability.
- Automated Testing and QA: Execute unit tests for the main library and example apps like LARExplorer to validate code changes and maintain high quality.
- Compiler Conflict Resolution: Automatically resolve 'unrecognized command-line option' errors by forcing the environment to use Apple Clang instead of incompatible GCC versions.
- Project Workspace Cleanup: Quickly remove build artifacts and temporary files using the clean command to reset the development environment.
- CI/CD Alignment: Ensure local builds match the exact configuration used in continuous integration pipelines to prevent 'works on my machine' issues.
| name | build-swift-project |
|---|---|
| description | Build and test the LocalizeAR Swift project using build.sh scripts. Use this skill whenever building, testing, or cleaning the project. NEVER use xcodebuild or swift build directly - always use build.sh. |
| allowed-tools | Bash(./build.sh:*), Bash(./Examples/LARExplorer/build.sh:*), Bash(./Examples/LARScan/build.sh:*) |
Build LocalizeAR Project
This skill manages building and testing the LocalizeAR Swift project using build scripts that properly configure compilers.
CRITICAL: Always Use build.sh
NEVER use these commands directly:
xcodebuildswift buildswift test
ALWAYS use build.sh scripts instead - they configure Apple Clang to prevent gcc-12 conflicts from Homebrew.
Main Library (LocalizeAR)
Located at project root. Use ./build.sh:
| Command | Description |
|---|---|
./build.sh |
Debug build |
./build.sh test |
Build and run tests |
./build.sh release |
Optimized release build |
./build.sh clean |
Remove build artifacts |
Example Apps
LARExplorer (macOS)
Located at Examples/LARExplorer/. Use ./Examples/LARExplorer/build.sh:
| Command | Description |
|---|---|
./Examples/LARExplorer/build.sh |
Debug build |
./Examples/LARExplorer/build.sh test |
Run unit tests |
./Examples/LARExplorer/build.sh release |
Release build |
./Examples/LARExplorer/build.sh clean |
Clean artifacts |
LARScan (iOS)
Located at Examples/LARScan/. Use ./Examples/LARScan/build.sh if available.
Example Requests
- "Build the project" →
./build.sh - "Run the tests" →
./build.sh test - "Build LARExplorer" →
./Examples/LARExplorer/build.sh - "Test LARExplorer" →
./Examples/LARExplorer/build.sh test - "Clean everything" →
./build.sh clean
Why build.sh?
The build scripts:
- Set
CCandCXXto Apple Clang (not Homebrew's gcc-12) - Prevent "unrecognized command-line option" errors
- Match CI/CD configuration exactly
- Display compiler versions for verification