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-14198] [SwiftPM] Frameworks which include an embedded Swift package which contains resources, is missing the resource bundle when the framework is archived #4451

Open
swift-ci opened this issue Feb 12, 2021 · 1 comment
Labels

Comments

@swift-ci
Copy link
Contributor

Previous ID SR-14198
Radar rdar://problem/74303935
Original Reporter PoloStyle07 (JIRA User)
Type Bug
Environment

swift build --version

Swift Package Manager - Swift 5.3.0
Additional Detail from JIRA
Votes 0
Component/s Package Manager
Labels Bug, RunTimeCrash
Assignee None
Priority Medium

md5: afa2e8136c1c74c18f30531f765bcf78

Issue Description:

Frameworks which include an embedded Swift package which contains resources, is missing the resource bundle when the framework is archived.

This leads to a crash whenever an attempt is made to access the resources by the app using the framework.

Expected behaviour: When the framework is archived, the bundle with the Swift package resources is present in the .framework or .xcframework.

Apps which integrate the framework can use the resources without crashing.

Current behaviour: When the framework is archived, the bundle with the Swift package resources is missing in the .framework or .xcframework.

Apps which use the framework crash when the code tries to access any of the missing resources.

Additional info:

  • Using xcodebuild to archive framework:
xcodebuild archive
  • 'Resources' folder is inside package under:
'Sources' -> package name -> 'Resources'
  • Added in package.swift with:
resources: [.process("Resources")])

See also the package manager resources proposal: https://forums.swift.org/t/accepted-with-modifications-se-0271-package-manager-resources/31021

@typesanitizer
Copy link

@swift-ci create

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants