Skip to content

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?

@calda
Copy link
Member

calda commented Jan 3, 2025

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