Xcode 27 Beta 4 regression: "Multiple commands produce" error when a SwiftPM binary xcframework product is linked from both an app target and an embedded framework target

In Xcode 27 Beta 4 (27A5228h), building a project that has a SwiftPM binary target (xcframework) linked directly from both an app target AND a framework target that is embedded in that app fails with "Multiple commands produce" errors. The same project and pbxproj builds successfully in Xcode 27 Beta 3 (27A5218g), so this is a regression introduced in Beta 4.

Steps to Reproduce

  1. Create a new iOS App project.
  2. Add a Framework target (e.g. "SampleCommon") and embed it into the app.
  3. Add a SwiftPM dependency for a package that vends a binary xcframework product. Confirmed with airbnb/lottie-spm 4.6.1 (https://github.com/airbnb/lottie-spm).
  4. In "Frameworks, Libraries, and Embedded Content" of the app target, add the SwiftPM product (Lottie) with "Embed & Sign".
  5. In "Frameworks and Libraries" of the framework target, add the same SwiftPM product (Lottie).
  6. Build the app scheme for iOS Simulator.

Expected result

Build succeeds. The xcframework is embedded exactly once into the .app bundle. This is the behavior in Xcode 27 Beta 3 and Xcode 26.

Actual result

Build fails with:

error: Unexpected duplicate tasks
error: Multiple commands produce '.../<App>.app/Frameworks/Lottie.framework/Lottie'
error: Multiple commands produce '.../<App>.app/Frameworks/Lottie.framework'

Two Copy tasks are emitted for the same output path in the app target:

  • Copy from Build/Products/Debug-iphonesimulator/PackageFrameworks/Lottie.framework
  • Copy from SourcePackages/artifacts/lottie-spm/Lottie/Lottie.xcframework/ios-arm64_x86_64-simulator/Lottie.framework

Additionally, an auto-generated target named "Lottiedynamic-product" emits duplicate MkDir / ProcessInfoPlistFile tasks for PackageFrameworks/Lottie.framework, which suggests the packaging path for binary xcframework products has been duplicated in Beta 4.

Regression

  • Xcode 27 Beta 3 (27A5218g): builds successfully
  • Xcode 27 Beta 4 (27A5228h): fails with the above errors
  • Xcode 26.x: builds successfully

Minimal reproduction

The issue reproduces on a 2-target Xcode project (app + framework) with airbnb/lottie-spm added and linked from both targetstory captures the smallest triggering diff:

  • pattern1: app links Lottie only -> BUILD SUCCEEDED
  • pattern2: framework links Lottie only -> BUILD SUCCEEDED
  • pattern3: both app and framework link Lottie -> BUILD FAILED (only on Beta 4)

Only the framework target's packageProductDependencies and Frameworks build phase entries differ between the succeeding and failing states.

Workaround

Link the SwiftPM binary product from only one target (either the app or the framework, not both). If only the framework tarl gets the framework transitively at runtime.

Impact

Any project that uses a SwiftPM binary xcframework and organizes code across multiple linked targets (a very common pattern for larger apps) is blocked from adopting Xcode 27 Beta 4.

Environment

  • Xcode 27.0 Beta 4 (27A5228h)
  • macOS 26.5.2
  • Package: airbnb/lottie-spm 4.6.1
  • Destination: iOS Simulator (iPhone 17, latest)

I also submitted feedback FB23932975.

Xcode 27 Beta 4 regression: "Multiple commands produce" error when a SwiftPM binary xcframework product is linked from both an app target and an embedded framework target
 
 
Q