Skip to content

Add SPM support with IGListKit integration and Xcode 26 compatibility#7

Merged
3a4oT merged 17 commits intodevelopmentfrom
modern-spm
Apr 1, 2026
Merged

Add SPM support with IGListKit integration and Xcode 26 compatibility#7
3a4oT merged 17 commits intodevelopmentfrom
modern-spm

Conversation

@3a4oT
Copy link
Copy Markdown
Owner

@3a4oT 3a4oT commented Apr 1, 2026

Add Swift Package Manager support with IGListKit integration, Xcode 26 / macOS 26 CI compatibility, and SectionControllerMethods to TextureIGListKitExtensions.

GianmarcoFolchi and others added 14 commits November 19, 2025 11:27
…ad (TextureGroup#2130)

* Fix: Transfer leadingScreensForBatching from pending state on node load
and add tests

* Address PR comments

* try to fix build

* Adding whitespace to see if builds run

* Revert prev commit to check if builds are working

---------

Co-authored-by: Gianmarco <gfolchi@pinterest.com>
- Updated DEVELOPER_DIR to Xcode_26.0.1 in all CI workflows
- Updated build.sh SDK from iphonesimulator17.4 to iphonesimulator26.0
- Updated simulator device from iPhone SE (3rd generation) to iPhone 17
- Updated actions/checkout from v2 to v4
- Changed runs-on from macos-latest to macos-15 for explicit versioning
- Verified all build configurations (framework, carthage, tests, examples)
Add comprehensive SPM support using Swift 6.2 package traits for modular features.

Core features:
- Package.swift with AsyncDisplayKit and TextureIGListKitExtensions products
- Default traits (Video, MapKit, Photos, AssetsLibrary) match CocoaPods defaults
- Optional IGListKit trait with pure Swift implementation
- TextNode2 (modern TextNode) enabled by default
- PINRemoteImage always included

IGListKit integration:
- Pure Swift implementation (traits don't work with Objective-C #if directives)
- ListAdapter.setCollectionNode(_:) replaces Objective-C setASDKCollectionNode:
- Uses IGListKit 5.0+ (breaking changes from 4.x in CocoaPods/Carthage)
- Runtime protocol conformance for ASCollectionDataSourceInterop

Infrastructure:
- SPM source layout generation script (scripts/generate_spm_sources_layout.swift)
- Symlinks from Source/ to spm/Sources/AsyncDisplayKit/
- Build script modes: spm-texture-basic and spm-texture-iglistkit
- CI jobs for both configurations with layout validation

Testing:
- SPMBasic example: 15 tests for core AsyncDisplayKit + PINRemoteImage
- SPMWithIGListKit example: 4 tests for IGListKit integration
- All tests passing

Documentation:
- README with usage examples and CocoaPods migration table
- CONTRIBUTING with SPM layout regeneration instructions
- Comprehensive TextureIGListKitExtensions guide

Reference implementations: Source/IGListAdapter+AsyncDisplayKit.mm,
Source/Private/ASIGListAdapterBasedDataSource.mm
- Add ASIGListKitSPM example demonstrating local package wrapper approach for iOS apps
- Update TextureIGListKitExtensions README with iOS/tvOS app integration guide
- Add spm-app-iglistkit build mode to test iOS app integration
- Improve SPM test strategy: spm-texture-basic tests committed files, spm-texture-iglistkit tests generation script
- Update example READMEs with clear documentation structure
- Change swift-tools-version from 6.2 to 6.1 in all Package.swift files
- Package Traits feature was introduced in Swift 6.1 (SE-0450)
- Update documentation to reflect Swift 6.1+ requirement
- Add Swift Package Manager badge to README
…s SPM traits

- Remove AssetsLibrary (deprecated iOS 9.0)
- Remove Video/MapKit/Photos traits that don't work with Swift via SPM
- Update documentation explaining SPM limitations with conditional compilation
- Recommend CocoaPods/Carthage for users needing these features

Technical details:
Objective-C classes wrapped in preprocessor conditionals (#if AS_USE_VIDEO)
are not exported in Swift module interface, making these traits non-functional
for Swift users even when enabled.

Tests: spm-texture-basic and spm-texture-iglistkit pass
- Add SupplementaryViewSourceMethods enum with viewForSupplementaryElement and sizeForSupplementaryView
- Replaces unavailable ASIGListSupplementaryViewSourceMethods for SPM users
- Comprehensive documentation with step-by-step examples
- Migration guide from Objective-C implementation

Fixes issue where ASIGListSupplementaryViewSourceMethods is inaccessible from Swift when using SPM with traits due to #if AS_IG_LIST_KIT wrapping.
- Updated Package.swift to enhance SPM source distribution for Texture, including detailed documentation on IGListKit integration and limitations.
- Removed deprecated UICoreKit example, including its Package.swift, source files, and tests, to streamline the project.
- Added module.modulemap for AsyncDisplayKit to eliminate umbrella header warnings.
- Adjusted build settings in project.pbxproj to reflect the removal of UICoreKit and ensure proper integration of TextureIGListKitExtensions.
…nderstanding for developers integrating with iOS/tvOS projects.
…gration

- Removed the custom module.modulemap for AsyncDisplayKit to prevent issues with C++ headers, allowing SPM to generate its own automatically.
Replace 'a < b < c' with correct ternary 'a < b ? prev : next' in
-insideComposedCharacterSequences and -insideEmoji blocks. Clang in
Xcode 26 now treats chained comparisons as a hard error (-Wparentheses).
- Updated DEVELOPER_DIR to Xcode_26.4 in all CI workflows
- Updated runs-on from macos-15 to macos-26
- Updated build.sh SDK from iphonesimulator26.0 to iphonesimulator26.4
- Updated simulator OS from 26.0 to 26.4
Swift equivalent of ASIGListSectionControllerMethods for SPM builds:
- cellForItem(at:sectionController:) dequeues _ASCollectionViewCell via context
- sizeForItem(at:) returns .zero (AsyncDisplayKit handles sizing)
@3a4oT 3a4oT merged commit 5e29249 into development Apr 1, 2026
7 of 24 checks passed
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