Skip to content

fix(ios): rebind scroll delegates after collection replacement - #1127

Open
OskarEichler wants to merge 1 commit into
callstack:masterfrom
OskarEichler:codex/pager-delegate
Open

fix(ios): rebind scroll delegates after collection replacement#1127
OskarEichler wants to merge 1 commit into
callstack:masterfrom
OskarEichler:codex/pager-delegate

Conversation

@OskarEichler

@OskarEichler OskarEichler commented Aug 27, 2026

Copy link
Copy Markdown

Summary

fix(ios): rebind scroll delegates after collection replacement. Fixes #1110.

Compatibility / observable changes

No public API change. Replacement collections regain callbacks; old collections regain their original delegate. NSObject selector and zero-size forwarding behavior is preserved.

Implementation

SwiftUI collection replacement leaves the pager scroll delegate attached to the previous collection. The change is kept independent from the other source-review fixes. This contribution is AI-assisted.

Test Plan

  • Eight UIKit/Objective-C selector checks pass (six fail on baseline): replacement collection binding, restoration, NSObject selectors and zero-size scroll forwarding.
  • Each independent PR's source overlay passes the root TypeScript check.
  • Combined review branch: bun run typescript, bun run lint (zero errors; 25 existing example warnings), bun run prepare, and git diff --check pass.
  • Combined example: Android Debug (./gradlew assembleDebug --max-workers=4), iOS Simulator Release (xcodebuild, signing disabled), and both production Metro bundles pass with its RN 0.85.3 dependencies.
  • Across the combined changes: 26 JS/React, 15 UIKit/provider, six ObjC++ and 21 Kotlin checks pass. Native API doubles and real UIKit execution are distinguished above.
  • Clean packaging of the combined branch includes the independent declaration-output fix proposed for Clean install fails because generated declarations do not match the package types entrypoint #1109; other PRs do not silently include that unrelated change.

No checked-in test files were added or modified. The existing Jest suite contains one TODO and no executed tests; focused external diagnostics provide the behavioral checks.

Prerequisites and reproduction

See #1110 for the baseline, reproduction and proposed fix.

Checklist

  • Tested on a physical device
  • Complete OS/device matrix

Downstream RN 0.87.1 verification

The combined 9.0.2 consumer artifact is pinned at 35a43b89b9e658c926a647a5b8bf9c7863e73771. Immutable install and byte comparison of all 66 non-metadata files pass. Both Android Debug variants, both iOS Debug Simulator variants, four production Metro bundles, 13 web builds, four extension builds and app lint pass. The first Android attempt encountered a concurrent web-output replacement during Gradle input hashing; serial rerun passed. The upstream iOS example also launches and renders its home screen. This does not cover physical devices or the complete Maestro interaction matrix.

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.

SwiftUI collection replacement leaves the pager scroll delegate attached to the previous collection

1 participant