Juanpe / Juanpe/SkeletonView

Add Support for Dynamic Library Product in Swift Package

Open Beginner friendly
#595 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
12.9k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

Description

Currently, SkeletonView only provides a static library product in its Swift Package Manager configuration.
This limits flexibility for projects that require or prefer dynamic linking,
causing duplicated symbols warnings.

Problem Statement

Dynamic linking offers several benefits in certain scenarios:

  • Reduced binary size when the same framework is shared across multiple app targets or extensions
  • Required for certain use cases such as some app extension configurations
  • Runtime flexibility for plugin architectures or modular app designs
  • Faster incremental builds during development in some project setups
Proposed Solution

Add a new library product SkeletonView-Dynamic with explicit type: .dynamic to the Package.swift configuration,
while maintaining the existing static library product for backward compatibility for those who do not require it.

This would involve adding a new product entry in Package.swift:

.library(
    name: "SkeletonView-Dynamic",
    type: .dynamic,
    targets: ["SkeletonView"]
)
Benefits
  • ✅ No breaking changes - existing integrations continue to work unchanged
  • ✅ Provides flexibility for consumers to choose linking type based on their needs
  • ✅ Follows standard Swift Package Manager practices
  • ✅ Minimal maintenance overhead - uses the same target as the static library
Usage Example

After implementation, users could opt into dynamic linking:

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in Package.swift and review the existing SkeletonView library product configuration. Add the requested dynamic product while preserving the current static product, then validate that the Swift package still resolves and builds with both products available.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
build-system
Issue type
Feature
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.