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
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ let package = Package(
name: "Lottie",
// Minimum platform versions should be kept in sync with the per-platform targets in Lottie.xcodeproj, lottie-ios.podspec, and lottie-spm's Package.swift
platforms: [.iOS("13.0"), .macOS("10.15"), .tvOS("13.0"), .custom("visionOS", versionString: "1.0")],
products: [.library(name: "Lottie", targets: ["Lottie"])],
products: [
.library(name: "Lottie", targets: ["Lottie"]),
// Product for dynamic linking, as SPM builds libraries statically by default.
// This product should be used in a modular project structure with multiple packages using Lottie to avoid duplicate symbols.
.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.

],
dependencies: [
.package(url: "https://github.com/airbnb/swift", .upToNextMajor(from: "1.0.1")),
],
Expand Down
Loading