Skip to content

Added Swift Package Manager Support#2134

Open
xquezme wants to merge 1 commit intoTextureGroup:masterfrom
xquezme:xzme/spm
Open

Added Swift Package Manager Support#2134
xquezme wants to merge 1 commit intoTextureGroup:masterfrom
xquezme:xzme/spm

Conversation

@xquezme
Copy link

@xquezme xquezme commented Feb 25, 2026

Swift Package Manager Support

Adds first-class SPM support, including source reorganization, a module map, opt-in traits for optional integrations, smoke tests, and CI coverage.


Package manifest (Package.swift)

  • Exposes AsyncDisplayKit as a static library product
  • Targets iOS 14+ and tvOS 14+
  • Requires Swift tools version 6.1+ (needed for trait support)
  • PINRemoteImage is bundled as the default image downloader — no extra setup needed
  • Two opt-in traits for optional integrations (off by default, see below)

Traits

Traits are disabled by default. Only the dependencies you explicitly enable are resolved.

Trait Pulls in Compiler flags set
IGListKit IGListKit + IGListDiffKit AS_IG_LIST_KIT, AS_IG_LIST_DIFF_KIT
Yoga Yoga layout engine YOGA
.package(
    url: "https://github.com/texturegroup/texture.git",
    from: "3.0.0",
    traits: ["IGListKit", "Yoga"]  // omit either or both
)

Source reorganization

All sources moved from Source/Source/Texture/, with public headers consolidated under Source/Texture/include/ to satisfy SPM's publicHeadersPath requirement. A module.modulemap was added to correctly expose the AsyncDisplayKit umbrella module with explicit submodules for ASControlNode+Subclasses and ASDisplayNode+Subclasses.


Smoke tests (smoke-tests/)

Three minimal test targets that validate SPM resolution and compilation end-to-end:

  • SwiftPackageManagerIntegration — baseline check: imports AsyncDisplayKit, creates an ASDKViewController<ASTextNode>
  • IGListKitIntegration — validates the IGListKit trait: implements a ListSectionController using ASSectionController and ASIGListSectionControllerMethods
  • YogaIntegration — validates the Yoga trait: exercises Yoga-specific layout API (flexGrow, flexShrink, alignSelf) that is only available when YOGA=1

CI

Added a spm-smoke-tests matrix job to .github/workflows/ci.yml that builds all three smoke test targets on every PR.


Other

  • Texture.podspec — updated source file globs and header paths to match the new Source/Texture/ layout
  • README.md — added SPM installation section and badge
  • build.sh — updated to support the new spm-smoke-tests build mode

@CLAassistant
Copy link

CLAassistant commented Feb 25, 2026

CLA assistant check
All committers have signed the CLA.

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