Posts

Post not yet marked as solved
3 Replies
0 Views
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
Post not yet marked as solved
3 Replies
0 Views
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.