Uploaded image for project: 'Swift'
  1. Swift
  2. SR-14198

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Component/s: Package Manager
    • Labels:
    • Environment:

      swift build --version

      Swift Package Manager - Swift 5.3.0

      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 

       

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            PoloStyle07 Marc Janga
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: