Add .xcworkspace support to Xcode build system#36
Merged
Conversation
Extend XcodeBuildSystem to detect and build with .xcworkspace files, preferring them over .xcodeproj when both exist (standard Xcode convention). - Rename xcodeproj property to projectFile, derive -workspace/-project flag from extension - Simplify ProjectInfo to decode both project and workspace JSON from xcodebuild -list - Add findXcodeProject() that prefers .xcworkspace over .xcodeproj - Add xcworkspace example project with workspace wrapping XcodeGen-generated project - Update MCP projectPath description to mention Xcode projects - Add swift-format and GitHub MCP permissions to .claude/settings.json Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…decoder error - findXcodeProject now prefers a workspace whose stem matches a colocated .xcodeproj, avoiding auxiliary workspaces (e.g., Pods.xcworkspace) - ProjectInfo decoder explicitly checks for both keys and throws a clear dataCorrupted error when neither project nor workspace key is present - Add tests: stem-matching preference, invalid JSON decoder error Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #34. Extends
XcodeBuildSystemto detect and build with.xcworkspacefiles, preferring them over.xcodeprojwhen both exist (standard Xcode convention).xcodeprojproperty toprojectFile, derive-workspace/-projectflag from extensionProjectInfoto decode both project and workspace JSON fromxcodebuild -listfindXcodeProject()that prefers.xcworkspaceover.xcodeprojexamples/xcworkspace/example project with workspace wrapping XcodeGen-generated projectprojectPathdescription to mention Xcode projectsswift-formatand GitHub MCP permissions to.claude/settings.jsonTest plan
swift buildpassesswift test --filter BuildSystem— all 35 tests pass, including new:findXcodeProjectFindsWorkspace— workspace-only directoryfindXcodeProjectPrefersWorkspace— both exist, workspace winsdecodeProjectInfoFromProjectJSON— project JSON formatdecodeProjectInfoFromWorkspaceJSON— workspace JSON formatpreview_startonexamples/xcworkspace/withprojectPathdetects workspace and renders🤖 Generated with Claude Code