[SR-14292] SPM + Xcode: Transitive binary dependencies get embedded in the framework instead of app #56651
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
Attachment: Download
Additional Detail from JIRA
md5: d2a1bd24af2dd2b3a849cbe3251503fa
Issue Description:
I have an iOS app with the following app structure in Xcode:
App
where `InternalFramework` depends on a binary, dynamic, framework integrated with SwiftPM. Let's call this binary framework Beacon (but it's the same with any binary framework).
When I build the project, `Beacon.framework` is embedded within `InternalFramework.framework` instead of being embedded in `App`.
This is incorrect because a framework shouldn't have sub-frameworks as far as I know, and more importantly in my case, because this prevents me from submitting to App Store Connect with the following error:
[20:04:42]: ERROR ITMS-90205: "Invalid Bundle. The bundle at 'App.app/Frameworks/Internal framework.framework' contains disallowed nested bundles." The attached project reproduces the problem.
Repro with attached project
Open the attached project in Xcode
Build for arm64
Right click on Product > SwiftPMBugFramework.app
Show in Finder
Open .app folder
Go to the Frameworks folder
Notice there is no Beacon.xcframework present
Open the Internal framework folder.
Notice it contains a Frameworks folder (IT SHOULDN'T)
Notice there is a Beacon.xcframework present in this Frameworks folder (IT SHOULDN'T)
SwiftPMBugFramework.zip
I have also submitted this bug as radar 9024372 as I'm unsure if it's an Xcode or SwiftPM bug.
Thanks!
The text was updated successfully, but these errors were encountered: