Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-14292] SPM + Xcode: Transitive binary dependencies get embedded in the framework instead of app #56651

Open
swift-ci opened this issue Mar 1, 2021 · 3 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.

Comments

@swift-ci
Copy link
Collaborator

swift-ci commented Mar 1, 2021

Previous ID SR-14292
Radar rdar://problem/74876046
Original Reporter Virlet (JIRA User)
Type Bug

Attachment: Download

Additional Detail from JIRA
Votes 1
Component/s
Labels Bug
Assignee None
Priority Medium

md5: d2a1bd24af2dd2b3a849cbe3251503fa

Issue Description:

I have an iOS app with the following app structure in Xcode:

App

  • InternalFramework

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!

@typesanitizer
Copy link

@swift-ci create

@swift-ci
Copy link
Collaborator Author

Comment by Bruno (JIRA)

This may be fixed in Xcode 13.3 => I can't see the Frameworks folder in InternalFramework anymore.

@swift-ci
Copy link
Collaborator Author

Comment by Bruno (JIRA)

This isn't fixed in Xcode 13.3: the InternalFramework doesn't have a Frameworks/ with the embedded dependencies anymore (that's correct), but the dependencies are not embedded in the target app (that's still a bug).

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.
Projects
None yet
Development

No branches or pull requests

2 participants