rollbar / rollbar-apple

Objective-C & Swift library for remote crash, exception, error reporting, and logging with Rollbar. It works on all Apple *OS platforms (macOS, iOS, tvOS, watchOS, etc).
https://docs.rollbar.com/docs/apple
MIT License
26 stars 17 forks source link

Setting the type of the library in `Package.swift` to `.dynamic`. #280

Open rashadatjou opened 1 year ago

rashadatjou commented 1 year ago

Is your feature request related to a problem? Please describe.

Yes, the feature request is related to a problem I'm facing while building a framework that leverages Rollbar. Rollbar exposes its products as a static library. However, when compiling the framework for production, the static library is embedded in the framework, causing potential issues like code duplication and increased binary size.

Describe the solution you'd like

I would like a solution that provides an option to not embed the static library when compiling the framework for production. This could be done by adding the property type: .dynamic to all libraries exposed in the products property of Package.swift. If this would not be possible please expose dynamic version of already existing libraries.

Describe alternatives you've considered

One alternative would be to manually remove the static library from the framework after it has been compiled, but this would be a cumbersome and error-prone process that would need to be repeated for each build.

Additional context

The current behavior of embedding the static library during the framework compilation may lead to issues such as code duplication and increased binary size. By providing an option to avoid embedding the static library, users of the package can have better control over their build process and avoid potential issues related to static library embedding.

rashadatjou commented 1 year ago

I have create a PR and tested it out with our Framework and it works.

https://github.com/rollbar/rollbar-apple/pull/281

ghost commented 1 year ago

Hey @rashadatjou, Thanks for reporting this issue, and I appreciate you created a PR too. Let me ask the devs to look into it.