Xcode: Skipping Duplicate Build File in Compile Sources in a .swiftpm Project – How to Fix?

I'm trying to add Assets.xcassets to a .swiftpm project, but I'm getting the warning:

⚠️ Ignoring duplicate build file in build source build phase

(Just to know, that is about developing in XCODE, in Swift Playgrounds does not appear it, even in this second being harder to setting up)

The problem is that there are no “Build Phases” in XCODE to remove duplicate files manually.

I've already tried adding the path of Assets.xcassets in the resources property of Package.swift, like:

.executableTarget(

name: "AppModule",

path: ".",

resources: [ .process("Assets.xcassets")

]

)

Even so, the warning persists. Does anyone know how to solve this? Is there any way to remove duplicate references or force a cleanup of the Swift Package Manager cache to fix it?

I appreciate any tips! 🙏🚀

Hello, would you be willing to file a report at https://feedbackassistant.apple.com/ and provide a sample project which reproduces this warning? If so, could you post the FB number here so I can look it up? Thanks!

Xcode: Skipping Duplicate Build File in Compile Sources in a .swiftpm Project – How to Fix?
 
 
Q