Skip to content

add Support for Dynamic Library Product in Swift Package, Fixes #595#596

Closed
kikiwora wants to merge 1 commit intoJuanpe:mainfrom
kikiwora:add-dynamic-versions
Closed

add Support for Dynamic Library Product in Swift Package, Fixes #595#596
kikiwora wants to merge 1 commit intoJuanpe:mainfrom
kikiwora:add-dynamic-versions

Conversation

@kikiwora
Copy link
Copy Markdown

Description

This PR adds support for dynamic linking by introducing a new library product SkeletonView-Dynamic in the Swift Package Manager configuration,
while maintaining the existing static library for backward compatibility.

Changes

  • Added a new .library product named SkeletonView-Dynamic with explicit type: .dynamic
  • The new product targets the same SkeletonView module as the existing static library
  • Maintains backward compatibility - the original SkeletonView library product remains unchanged

Benefits

  • Allows consumers to choose between static (default) and dynamic linking
  • Useful for scenarios requiring dynamic frameworks (e.g., certain app extensions, reducing binary size with shared frameworks)
  • No breaking changes to existing integrations

Usage

Users can now specify the dynamic variant in their Package.swift:

dependencies: [
    .package(url: "https://github.com/Juanpe/SkeletonView.git", from: "1.0.0")
],
targets: [
    .target(
        name: "MyApp",
        dependencies: [
            .product(name: "SkeletonView-Dynamic", package: "SkeletonView")
        ]
    )
]

Testing

  • Package validates successfully with swift package dump-package
  • Both static and dynamic products are properly configured
  • No impact on existing integrations

@kikiwora kikiwora closed this by deleting the head repository Apr 27, 2026
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.

2 participants