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

Add additional dynamic library product to Package.swift #2507

Merged
merged 2 commits into from
Dec 6, 2024

Conversation

JensK611
Copy link
Contributor

@JensK611 JensK611 commented Dec 5, 2024

Hi Lottie-Team,

I would like to link the Lottie framework dynamically to use it inside another framework.
To avoid duplicate symbols the library should not embedded in the framework target and only embedded in the app target.

To solve this issue (since SPM Dependencies are automatically built statically) another product has been added to the Package.swift file allowing to build a dynamic framework. This seems to be a common practice as it is used by the SnapKit and RxSwift framework.

products: [.library(name: "Lottie", targets: ["Lottie"])],
products: [
.library(name: "Lottie", targets: ["Lottie"]),
.library(name: "Lottie-Dynamic", type: .dynamic, targets: ["Lottie"]),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment here explaining the difference between Lottie and Lottie-Dynamic, and a quick explanation of when you would prefer to use Lottie-Dynamic instead of Lottie?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @calda , thank you for your quick response! I've added a short description to the Package.swift hope this is sufficient.

Copy link
Member

@calda calda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable to me

Copy link
Member

@calda calda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@calda calda merged commit 55aa1db into airbnb:master Dec 6, 2024
12 checks passed
@roman-suvorov-onseo
Copy link

Hey! This is precisely what we need.
Would you kindly tell us when we can expect a public release with this change to happen?

P.S.
Maybe it makes sense to make a cherry-pick to make a small patch-release with only this change, based on the current release version?

roman-suvorov-onseo pushed a commit to roman-suvorov-onseo/lottie-ios that referenced this pull request Dec 26, 2024
roman-suvorov-onseo added a commit to roman-suvorov-onseo/lottie-ios that referenced this pull request Dec 26, 2024
@calda
Copy link
Member

calda commented Jan 3, 2025

Sure, I just released 4.5.1: https://github.com/airbnb/lottie-ios/releases/tag/4.5.1

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

Successfully merging this pull request may close these issues.

3 participants