You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This module provides a single extension method to`IGListAdapter`that enables seamless integration with `ASCollectionNode`.
15
+
This module provides Swift extension methods for`IGListAdapter`to enable seamless integration with `ASCollectionNode`.
16
16
17
-
**Why this exists:** The original Objective-C implementation (`setASDKCollectionNode:` in `IGListAdapter+AsyncDisplayKit.mm`) doesn't compile in SPM builds because Swift Package Manager traits don't work with conditional compilation (`#if AS_IG_LIST_KIT`) in Objective-C code. This is a pure Swift reimplementation of that Objective-C code.
17
+
### Why This Exists
18
+
19
+
**The Problem:** Swift Package Manager cannot export Objective-C categories on classes from other modules. The original Objective-C API `setASDKCollectionNode:` (defined in `IGListAdapter+AsyncDisplayKit.mm`) extends `IGListAdapter` class from the `IGListKit` module, which SPM cannot handle in source builds.
20
+
21
+
**The Solution:** This is a pure Swift reimplementation that works around SPM's limitation.
18
22
19
23
**Reference implementation:** This Swift code is based on the existing Objective-C implementation in:
**This package uses IGListKit 5.0+ (latest major version)** with important API changes:
31
+
32
+
### Key Changes from IGListKit 4.x
25
33
26
-
**SPM uses IGListKit 5.0+ (latest major version)** which includes breaking changes compared to versions used by CocoaPods/Carthage.
34
+
-`allowsBackgroundDiffing` (NEW) - enables background thread diffing for better performance
35
+
-`allowsBackgroundReloading` (REMOVED) - caused animation issues, automatically handled in 5.0+
27
36
28
-
-**Not a drop-in replacement** - Migration and testing required
29
-
-**API differences** - IGListKit 5.0 has breaking changes from 4.x
30
-
-**Different target** - This is specifically for SPM users
31
-
-**No Carthage/CocoaPods support planned** - We recommend migrating to SPM
37
+
### Updated API Calls
32
38
33
-
If you're currently using Texture with IGListKit via CocoaPods or Carthage, please thoroughly test your integration when migrating to SPM.
39
+
**Old (IGListKit 4.x):**
40
+
```swift
41
+
updater.allowsBackgroundReloading=false// Removed in 5.0
42
+
```
43
+
44
+
**New (IGListKit 5.0+):**
45
+
```swift
46
+
updater.allowsBackgroundDiffing=true// Use this instead
47
+
```
48
+
49
+
The Swift implementation (`IGListAdapterDataSourceBridge`) has been updated to use the new API.
34
50
35
51
## What You Get
36
52
@@ -103,15 +119,7 @@ To connect them, you need special bridging code that:
103
119
104
120
## Using in iOS/tvOS App Projects
105
121
106
-
### The Problem
107
-
108
-
As of Xcode 26.0.1, Xcode does not provide a UI for enabling SPM package traits in iOS/tvOS app targets. Traits can only be enabled in Package.swift files, which app projects do not have.
109
-
110
-
Note: If you are using a newer version of Xcode, check whether Apple has added trait configuration support in the Xcode UI.
111
-
112
-
### The Solution
113
-
114
-
Create an intermediate local Swift package to enable the IGListKit trait.
122
+
Simply add Texture as a dependency and import both modules:
0 commit comments