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

Swift Package Manager Dynamic Libraries #706

Open
brianmakenoise opened this issue Sep 30, 2021 · 0 comments
Open

Swift Package Manager Dynamic Libraries #706

brianmakenoise opened this issue Sep 30, 2021 · 0 comments

Comments

@brianmakenoise
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant