Skip to content

Fix missing dstPath in Copy Bundle Resources phases - #1654

Open
Ckitakishi wants to merge 2 commits into
yonaskolb:masterfrom
Ckitakishi:fix-copy-bundle-resources-dst-path
Open

Ckitakishi wants to merge 2 commits into
yonaskolb:masterfrom
Ckitakishi:fix-copy-bundle-resources-dst-path

Conversation

@Ckitakishi

@Ckitakishi Ckitakishi commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Summary

XcodeGen omitted dstPath when generating the "Copy Bundle Resources" copy files phase. Xcode-written projects carry the key with an empty value when no subpath is needed (Embed Frameworks, Embed App Extensions), and Xcode 27.2 rejects a missing value when converting a project to the new project.xcproj format.

The generated phase now uses dstPath: "", consistent with the other copy files phase generation paths.

Reproduction

Requires Xcode 27.2, which added the xcproj format. Xcode 27.0 rejects it with Could not find requested format.

project.yml:

name: Demo

targets:
  App:
    type: application
    platform: iOS
    dependencies:
      - bundle: MyBundle.bundle
xcodegen generate
xcodebuild -project Demo.xcodeproj -convert-project xcproj

Before this change the conversion fails:

xcodebuild: error: Unable to save project: A copy build phase is missing a required value for destination path

Encountered while saving:
• A project named “Demo”
• A native target named “App”
• A copy files build phase named “Copy Bundle Resources”

After it the conversion succeeds and replaces project.pbxproj with project.xcproj. A failing conversion leaves the project untouched.

Testing

  • Bundle copy phase tests now assert dstPath == ""
  • Updated the TestProject fixture with dstPath = "";
  • Ran swift test

Ckitakishi and others added 2 commits September 18, 2026 10:31
The generated "Copy Bundle Resources" phase omitted `dstPath`, and
converting such a project to the Xcode 27.2 JSON format fails with
"A copy build phase is missing a required value for destination path".
Xcode-written projects carry the key with an empty path when no subpath
is needed, and every other phase XcodeGen generates already does.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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