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

Frameworks built from Swift packages lack a Headers folder

    XMLWordPrintable

    Details

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

      Xcode 12.5/Swift 5.4

      Description

      When a Swift package Foo declares a dynamic library product for a Swift target Foo that declares some @objc protocols and classes, building that package should result in a framework Foo.framework that has a headers folder Foo.framework/Headers/ containing auto-synthesized Foo.h that includes Foo-Swift.h. That way, Xcode projects with Obj. C code can simply link to Foo.framework and use any @objc code declared therein.

      However the current version of SPM fails to add this Headers folder, resulting in any @objc APIs in Foo being invisible to Obj. C code in any modules that link to Foo.framework.

      This seems like it should be easy to rectify...

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              xy Jonathan Gilbert
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated: