-
Couldn't load subscription status.
- Fork 1.3k
Swift Package Manager Support with IGListKit Integration #2128
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
Open
3a4oT
wants to merge
10
commits into
TextureGroup:master
Choose a base branch
from
3a4oT:modern-spm
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- 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.
|
@rcancro, hello, this PR should be ready for review, please let me know if this can be upstreamed? |
…gration - Removed the custom module.modulemap for AsyncDisplayKit to prevent issues with C++ headers, allowing SPM to generate its own automatically.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds Swift Package Manager support for Texture with IGListKit integration.
Changes
Package.swift:
TextureIGListKitExtensions module:
adapter.setCollectionNode(node)as Swift-friendly alternative to Objective-CsetASDKCollectionNode:allowsBackgroundDiffinginstead of removedallowsBackgroundReloading)Build infrastructure:
Examples:
Why Swift wrapper is needed
SPM cannot export Objective-C categories on classes from external modules. The original
IGListAdapter+AsyncDisplayKitcategory extendsIGListAdapterfrom theIGListKitmodule, which SPM source builds cannot compile. The Swift implementation provides the same functionality while working within SPM's constraints.Design decisions
Traits approach: Initially explored using SPM traits for optional IGListKit support, but this was removed because:
IGListKit always available: IGListKit dependencies are included but compile-time flags are disabled (AS_IG_LIST_KIT=0), allowing users to opt-in via the Swift
wrapper module.