Skip to content

feat(ios): add Swift Package Manager support - #1187

Draft
krozniata wants to merge 3 commits into
mainfrom
feat/spm-support
Draft

krozniata wants to merge 3 commits into
mainfrom
feat/spm-support

Conversation

@krozniata

Copy link
Copy Markdown
Member

Summary

Test Plan

What's required for testing (prerequisites)?

What are the steps to reproduce (after prerequisites)?

Compatibility

OS Implemented
iOS ✅❌
Android ✅❌

Checklist

  • I have tested this on a device and a simulator
  • I added the documentation in README.md
  • I updated the typed files (TS and Flow)

Copilot AI lite review requested due to automatic review settings October 16, 2026 12:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Fix the incompatible Swift bridge and enforce the SwiftPM CI job before approval.

2 open findings
What changed in this PR

Adds Swift Package Manager support for the iOS pager view while preserving CocoaPods integration.

Changes:

  • Adds SwiftPM manifest and package metadata.
  • Introduces Objective-C/Swift bridging updates.
  • Adds SwiftPM CI workflow support.
File Summary Findings
react-native-pager-view.podspec Excludes the SwiftPM manifest from CocoaPods sources. None
package.json Adds SwiftPM metadata. Nit (1 vote): document SwiftPM installation and the CocoaPods/SwiftPM choice.
ios/​RNCPagerViewProviding.h Defines the native provider bridge API. None
ios/​RNCPagerViewComponentView.mm Uses the provider bridge. None
ios/​PagerViewProvider.swift Implements the Swift provider bridge. Critical (1 vote): the @_cdecl signature is not C-compatible and will fail compilation.
ios/​PagerViewProps.swift Imports shared SwiftPM enum definitions. None
ios/​PagerView.swift Adds SwiftPM imports. None
ios/​PagerScrollDelegate.swift Updates delegate event calls. None
ios/​Package.swift Defines SwiftPM targets and dependencies. None
.gitignore Ignores SwiftPM artifacts. None
.github/​workflows/​ios.yml Adds SwiftPM iOS build support. None
.github/​workflows/​ci.yml Adds the SwiftPM CI job. Moderate (4 votes): include ios-spm in the required checks and result validation.

🧠 Review effort: Lite


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread ios/PagerViewProvider.swift
Comment thread .github/workflows/ci.yml
@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

🟢 e2e: 20 passed

All 20 tests in 12 files
Test Time
🟢 tests/basic-pager.e2e.ts · 3 passed 1m 43s
🟢 basic pager › in LTR › pages horizontally 39.5s
🟢 basic pager › in LTR › pages vertically 22.8s
🟢 basic pager › in RTL › pages horizontally with the reversed gesture 40.7s
🟢 tests/issues/issue-1083-modal-set-page.e2e.ts · 1 passed 14.6s
🟢 setPage called behind a native-stack modal lands on the requested page 14.6s
🟢 tests/issues/issue-1098-nested-pager.e2e.ts · 1 passed 13.2s
🟢 outer pager stays responsive after its page count changes around a nested pager 13.2s
🟢 tests/issues/issue-1154-page-change-focus.e2e.ts · 3 passed 42.0s
🟢 leaving a page with setPage blurs its input 12.9s
🟢 leaving a page with a swipe blurs its input 10.7s
🟢 an input focused on the new page keeps focus 18.4s
🟢 tests/issues/issue-1156-nested-horizontal-scroll.e2e.ts · 3 passed 28.4s
🟢 a horizontal ScrollView in a page scrolls instead of the pager 9.5s
🟢 the pager takes the swipe once the ScrollView is at its edge 10.0s
🟢 a swipe outside the ScrollView changes the page 8.9s
🟢 tests/issues/issue-424-swipe-cancels-press.e2e.ts · 3 passed 32.1s
🟢 a tap on a button in a page presses it 9.2s
🟢 a swipe that starts on a button in a page cancels its touch 9.2s
🟢 a swipe while the JS thread is busy does not press the button 13.6s
🟢 tests/material-top-bar.e2e.ts · 1 passed 10.9s
🟢 material top tabs survive a native-stack push and pop 10.9s
🟢 tests/nested-pager-view.e2e.ts · 1 passed 10.6s
🟢 nested horizontal and vertical pagers scroll independently 10.6s
🟢 tests/on-page-selected.e2e.ts · 1 passed 13.0s
🟢 onPageSelected fires an alert for every page change 13.0s
🟢 tests/scrollable-pager-view.e2e.ts · 1 passed 16.5s
🟢 pager inside a ScrollView keeps its page across vertical scrolls 16.5s
🟢 tests/smoke.e2e.ts · 1 passed 9.0s
🟢 horizontal pager pages with the panel buttons 9.0s
🟢 tests/tab-view-inside-scroll-view.e2e.ts · 1 passed 14.7s
🟢 TabView inside a ScrollView swipes tabs and scrolls the page 14.7s

e2e 0.21.0 · 5m 9s · android · run artifacts

@callstack callstack deleted a comment from github-actions Bot Oct 16, 2026
@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

🟢 e2e: 1 flaky, 12 passed

⚠️ 1 flaky test passed on a retry

⚠️ horizontal pager pages with the panel buttons
tests/smoke.e2e.ts:17

ACTION_FAILED at step 10 of 10: locator.tap getByTestId("prev-page-button"), after 32.0s

tap timed out before the device answered; its input may have been dispatched: getByTestId("prev-page-button")

All 13 tests in 11 files
Test Time
⚠️ tests/smoke.e2e.ts · 1 flaky 47.5s
⚠️ horizontal pager pages with the panel buttons (1 failed attempt first) 47.5s
🟢 tests/basic-pager.e2e.ts · 3 passed 1m 22s
🟢 basic pager › in LTR › pages horizontally 22.2s
🟢 basic pager › in LTR › pages vertically 23.0s
🟢 basic pager › in RTL › pages horizontally with the reversed gesture 36.6s
🟢 tests/issues/issue-1083-modal-set-page.e2e.ts · 1 passed 12.7s
🟢 setPage called behind a native-stack modal lands on the requested page 12.7s
🟢 tests/issues/issue-1096-keyboard-shrink.e2e.ts · 1 passed 19.3s
🟢 keyboard avoidance does not shrink the page under the keyboard 19.3s
🟢 tests/issues/issue-1098-nested-pager.e2e.ts · 1 passed 20.8s
🟢 outer pager stays responsive after its page count changes around a nested pager 20.8s
🟢 tests/issues/issue-1142-search-bar-inset.e2e.ts · 1 passed 16.6s
🟢 FlatList inside the pager gets the search bar safe-area insets 16.6s
🟢 tests/material-top-bar.e2e.ts · 1 passed 15.4s
🟢 material top tabs survive a native-stack push and pop 15.4s
🟢 tests/nested-pager-view.e2e.ts · 1 passed 13.2s
🟢 nested horizontal and vertical pagers scroll independently 13.2s
🟢 tests/on-page-selected.e2e.ts · 1 passed 16.3s
🟢 onPageSelected fires an alert for every page change 16.3s
🟢 tests/scrollable-pager-view.e2e.ts · 1 passed 30.7s
🟢 pager inside a ScrollView keeps its page across vertical scrolls 30.7s
🟢 tests/tab-view-inside-scroll-view.e2e.ts · 1 passed 18.3s
🟢 TabView inside a ScrollView swipes tabs and scrolls the page 18.3s

e2e 0.21.0 · 5m 44s · ios · run artifacts

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