Xcode 13.3 fails to include binary SPM dependencies

As of Xcode 13.3, binary SPM dependencies are no longer included in our app's Frameworks folder. When our app is launched on a device, it crashes with a Library not loaded: @rpath/... error with the list of attempted framework search paths.

Is this a known issue with Xcode 13.3 and 13.3.1? Is there a workaround?

UPDATE: This appears to only be an issue when it's a framework target linking against the binary dependency. We have a workspace setup where first an internal framework is compiled (which links against the SPM binary dependency), and then our app target links against the internal framework.

I managed to get this working, but I still think this is likely a bug introduced in Xcode 13.3. We have third-party dependencies that are shared between a framework target and an app target. Prior to Xcode 13.3, all dependencies were added to the framework target via SPM and could be utilized by both the framework target and the app target.

As of Xcode 13.3, this is no longer the case for binary dependencies and the app will crash on startup when it's run on a device. It's unclear to me what has changed, and there's no mention of it in the Xcode release notes. The workaround is to add any binary dependencies to both the framework target AND to the app target via SPM. This isn't ideal though, because the frameworks get linked twice, resulting in duplicate symbols and a bunch of warnings in Xcode. More details and hacky fixes are available in this long thread: https://forums.swift.org/t/swift-packages-in-multiple-targets-results-in-this-will-result-in-duplication-of-library-code-errors/34892/36

Hi! We are also experiencing the very same issue since 13.3 and have a very similar project setup to what you described. Have you found a better solution so far? Right now, we have a Shell script that manually locates the binary that is missing from the checkouts folder, copies parts of it into the apps Frameworks folder after build and code signs it. However, this is far from perfect as well..

Xcode 13.3 fails to include binary SPM dependencies
 
 
Q