Skip to content

Swift Package Manager Dynamic Libraries #706

@brianmakenoise

Description

@brianmakenoise

I want to propose that you add a dynamic library product to the Package.swift file.

The issue I'm having is we have a Xcode workspace with a project to build a framework with reusable custom UI widgets along with the project for the application. Both have dependencies on Bond and ReactiveKit, so we added package dependencies in both projects for them. The application builds and runs from Xcode. However, Xcode seems to be deciding to automatically create dynamic frameworks for Bond, ReactiveKit, and Differ (it makes the static libraries too), and then embeds these frameworks into frameworks which can't be uploaded to App Store Connect.

I did try removing the package dependencies from the UI framework project, and it does act like it picks up the static libraries and module map files from the build products directory, but the import of Bond shows an error "missing required module 'BNDProtocolProxyBase'" which has a .o file but no module map files.

The other thing I tried was to add a SPM library that has a dynamic product to our framework project, and it doesn't embed the framework into the framework. Plus, Xcode allows selecting if the library is embedded. This is why I proposed to add a dynamic library product to the Package.swift to Bond, ReactiveKit, and Differ as it probably is the easiest way to keep Xcode from creating and embedding dynamic libraries.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions