macos-build

Build native macOS Xcode projects from the command line using xcodebuild.

Updated Mar 12, 2026
One-click install
npx skills add https://github.com/RavitejaKarra24/dotfiles --skill macos-build-ravitejakarra24
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: macos-build
Source: https://github.com/RavitejaKarra24/dotfiles/tree/main/agents/.agents/skills/macos-build
Command: npx skills add https://github.com/RavitejaKarra24/dotfiles --skill macos-build-ravitejakarra24

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Verifying that a native macOS app compiles normally requires opening Xcode and manually running builds, which interrupts CLI-driven development workflows. This Skill compiles any Xcode project or workspace from the terminal, surfaces build errors, and helps fix them. ## Core Features & Use Cases - Project Discovery: Locate .xcodeproj or .xcworkspace files and list available schemes with xcodebuild -list. - CLI Builds: Run xcodebuild with the correct scheme, configuration, and macOS destination, filtering output to show BUILD SUCCEEDED, BUILD FAILED, and error lines. - Error Diagnosis: Interpret common failures such as missing SPM modules, signing identity errors, wrong DEVELOPER_DIR, and unknown schemes, then re-run the build after fixes. - Use Case: After editing Swift source files, ask the agent to verify the project compiles; it finds the workspace, builds the Debug configuration, reports errors with file and line references, and confirms the fix with a rebuild. ## Quick Start Build my macOS app with xcodebuild and tell me whether it compiles, fixing any errors you find.

Frequently Asked Questions about macos-build

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a macOS app from the command line?

Use xcodebuild build with the -project or -workspace flag, a scheme, and a destination such as platform=macOS. Set DEVELOPER_DIR to your Xcode installation and filter output for BUILD SUCCEEDED, BUILD FAILED, and error lines.

How do I find available schemes in an Xcode project?

Run xcodebuild -list -project YourApp.xcodeproj to print all schemes defined in the project. This is the first step when a build fails with a scheme not found error.

Should I use xcodebuild with a project or a workspace?

Use -workspace when the app has Swift Package Manager dependencies or CocoaPods, since the workspace includes those packages. Use -project for standalone Xcode projects without external package integration.

Why does xcodebuild fail with no signing identity found?

Command-line builds attempt code signing by default, which fails without a configured identity. Set CODE_SIGN_IDENTITY="" and CODE_SIGNING_ALLOWED=NO to skip signing for local verification builds.

How do I build against a beta macOS SDK?

Point DEVELOPER_DIR to the beta Xcode path, such as /Applications/Xcode-beta.app/Contents/Developer, before running xcodebuild. Check installed versions with ls /Applications | grep -i xcode.

Why does xcodebuild report no such module for a Swift package?

The SPM dependencies have not been resolved yet. Run xcodebuild -resolvePackageDependencies first to fetch packages, then retry the build.