Skip to content

fix: preserve platform filters in synchronized build phase exceptions - #1209

Open
Ckitakishi wants to merge 1 commit into
tuist:mainfrom
Ckitakishi:fix/synced-phase-platform-filters
Open

Ckitakishi wants to merge 1 commit into
tuist:mainfrom
Ckitakishi:fix/synced-phase-platform-filters

Conversation

@Ckitakishi

@Ckitakishi Ckitakishi commented Dec 3, 2026 •

Copy link
Copy Markdown

Short description 📝

Reading and rewriting a project.pbxproj with XcodeProj drops per-file platform filters on synchronized folder build phase exceptions. Reading a project.xcproj with the equivalent platforms entry throws an error.

In a test project, the dropped filter caused a macOS-only XPCService.xpc to be copied into the iOS app.

Solution 📦

Preserve platformFiltersByRelativePath when reading and writing project.pbxproj, and map it to and from platforms in project.xcproj.

Implementation 👩‍💻👨‍💻

  • Store the filters on build phase exception sets and include them in equality checks.
  • Add filters to the on-disk fixtures to cover both formats and conversion between them.

Testing

  • swift test on macOS: 384 XCTest tests and 103 Swift Testing tests passed.
  • SwiftFormat passed. SwiftLint reported no new warnings compared with main.
  • Built the same iOS test app with Xcode 27.2 after rewriting its project before and after the fix. The macOS-only XPCService.xpc was present in the first .app and absent in the second.

Read and write per-member platform filters for synchronized build
phase exceptions in both project formats.

Co-authored-by: Codex <codex@openai.com>

This branch has not been deployed

No deployments
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