Skip to content

Fix Xcode project for Carthage build after SwiftPM structure change#15

Merged
Adobels merged 1 commit intomainfrom
develop
Sep 3, 2025
Merged

Fix Xcode project for Carthage build after SwiftPM structure change#15
Adobels merged 1 commit intomainfrom
develop

Conversation

@Adobels
Copy link
Owner

@Adobels Adobels commented Sep 3, 2025

Summary by CodeRabbit

  • Refactor

    • Reorganized project structure to use a file-system–synchronized root group, consolidating sources under a dedicated path for cleaner navigation and maintenance.
    • Removed obsolete groupings and redundant references; sources are now managed automatically by the project.
  • Chores

    • Upgraded project format and Swift metadata to align with newer Xcode versions, improving build consistency.
    • Cleaned up build phase configuration. No user-facing changes; the framework’s behavior and APIs remain unchanged.

@coderabbitai ignore

@Adobels Adobels self-assigned this Sep 3, 2025
@coderabbitai
Copy link

coderabbitai bot commented Sep 3, 2025

Walkthrough

Reorganizes the Xcode project to use a PBXFileSystemSynchronizedRootGroup at Sources/UIViewKit, removes individual file references and source groups, empties the Sources build phase, updates the target to use the synchronized group, and bumps project metadata (objectVersion to 70, LastSwiftUpdateCheck to 1630).

Changes

Cohort / File(s) Summary
File-system synchronized root group addition and source relocation
UIViewKit.xcodeproj/project.pbxproj
Adds PBXFileSystemSynchronizedRootGroup named “UIViewKit” pointing to Sources/UIViewKit; moves source organization under this path; updates main group children to include the new root group.
Removal of legacy groups and file references
UIViewKit.xcodeproj/project.pbxproj
Removes prior PBXGroup/PBXFileReference entries (e.g., UIViewDSL, IBConstraints, IBPreviews, Views, UIKitExtensions, IBDebug and their files).
Build phase adjustments
UIViewKit.xcodeproj/project.pbxproj
Empties PBXSourcesBuildPhase file list, removing individual PBXBuildFile entries previously compiled.
Target configuration updates
UIViewKit.xcodeproj/project.pbxproj
Updates PBXNativeTarget (UIViewKit) to declare fileSystemSynchronizedGroups referencing the new root group; keeps UIViewKit.framework as product.
Project metadata updates
UIViewKit.xcodeproj/project.pbxproj
Bumps objectVersion from 56 to 70; sets LastSwiftUpdateCheck = 1630.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

I hopped through groups and tidied the grove,
From scattered twigs to a single cove.
Now Sources/UIViewKit is where I burrow,
Build phase quiet—no files to furrow.
With version bumped and carrots aligned,
This project’s paths are neatly defined. 🥕✨

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch develop

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
UIViewKit.xcodeproj/project.pbxproj (1)

143-151: Critical: Sources build phase is empty — framework will compile with zero Swift files.

With PBXSourcesBuildPhase.files = (), xcodebuild/Carthage will either fail or produce an empty framework with no symbols. File-system–synced groups do not replace explicit PBXBuildFile membership. Re-add all Swift sources from Sources/UIViewKit to this build phase (Target Membership in Xcode), or restore PBXBuildFile entries in the .pbxproj.

🧹 Nitpick comments (5)
UIViewKit.xcodeproj/project.pbxproj (5)

26-28: Using PBXFileSystemSynchronizedRootGroup: verify Carthage/xcodebuild compatibility on your CI Xcode version.

This construct requires recent Xcode and is not recognized by older toolchains. Ensure your CI and consumers use a sufficiently new Xcode; otherwise Carthage builds may break.

If you want to fully avoid project-format churn for Carthage users, consider shipping a prebuilt XCFramework via a binary Carthage spec while keeping SPM as source-of-truth.


6-6: objectVersion bumped to 70 — align minimum Xcode and project compatibility.

Confirm your minimum Xcode (likely 16.x). For consistency, update compatibilityVersion too.

Apply:

-compatibilityVersion = "Xcode 14.0";
+compatibilityVersion = "Xcode 16.0";

107-109: Metadata stamps are inconsistent (LastSwiftUpdateCheck 1630 vs LastUpgradeCheck 1500).

Align these to the same Xcode version to avoid upgrade nags and review noise.

-				LastUpgradeCheck = 1500;
+				LastUpgradeCheck = 1630;

279-314: Remove stray placeholder setting.

NEW_SETTING = "" looks like a leftover and adds churn to diffs.

-				NEW_SETTING = "";

153-218: Optional: consolidate versioning at the project level.

CURRENT_PROJECT_VERSION is set to 1 at project and 1.9 at target; MARKETING_VERSION is 1.9 at target only. Consider defining both at the project level and inheriting to reduce drift.

Also applies to: 221-277

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 8192637 and 51565de.

📒 Files selected for processing (1)
  • UIViewKit.xcodeproj/project.pbxproj (5 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
UIViewKit.xcodeproj/project.pbxproj (4)
Sources/UIViewKit/IBPreviews/IBPreviewFreeForm.swift (2)
  • iOS (11-76)
  • containerView (78-166)
Sources/UIViewKit/IBPreviews/IBRepresentables.swift (3)
  • iOS (33-53)
  • updateUIView (52-52)
  • iOS (11-31)
Sources/UIViewKit/UIKitExtensions/UIViewController+Extensions.swift (1)
  • ibSetView (10-45)
Tests/UIViewKitTests/IBSubviewsTests.swift (1)
  • testIBSubviews (10-85)

Comment on lines +92 to +94
fileSystemSynchronizedGroups = (
BEFE69582E68DDC0006AC2FB /* UIViewKit */,
);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

❓ Verification inconclusive

fileSystemSynchronizedGroups doesn’t auto-populate Sources.

Declaring the synchronized group on the target is not a substitute for adding files to PBXSourcesBuildPhase. After syncing the navigator, ensure every Swift file is target-membered so the compiler sees it.


Add Swift files to the target’s PBXSourcesBuildPhase
fileSystemSynchronizedGroups (lines 92–94 in UIViewKit.xcodeproj/project.pbxproj) only syncs the navigator—it does not include files in PBXSourcesBuildPhase. Manually verify and add every Swift file under the target’s Sources build phase so the compiler can see them.

🤖 Prompt for AI Agents
In UIViewKit.xcodeproj/project.pbxproj around lines 92–94, the project currently
only lists fileSystemSynchronizedGroups for the UIViewKit navigator and is
missing Swift source entries in the target’s PBXSourcesBuildPhase; open the
project.pbxproj or Xcode project editor, locate the PBXSourcesBuildPhase for the
UIViewKit target, and add an entry for every Swift file (the PBXBuildFile
references) into that PBXSourcesBuildPhase so each Swift file is included in
compilation; ensure each PBXFileReference for .swift files exists in the file
list and that corresponding PBXBuildFile GUIDs are referenced in the target’s
sources array, then save the project so the compiler can see and build all Swift
files.

@Adobels Adobels merged commit 1439533 into main Sep 3, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant