When adding a Swift Binary Package to an Xcode project that also have an extension the binary package will be copied both to the Plugins folder and the Frameworks folder.
This happen on Xcode 12.1 and earlier.
A sample project to reproduce this bug can be found here:
To reproduce the bug:
- Open SwiftBinaryPackageBugSample.xcodeproj Xcode project.
- Wait for all the packages to resolve.
- Build or archive the application and examine its structure.