Skip to content

✨ feat: prevent click action#253

Open
MorganBerger wants to merge 12 commits intomasterfrom
feature/prevent-click-action
Open

✨ feat: prevent click action#253
MorganBerger wants to merge 12 commits intomasterfrom
feature/prevent-click-action

Conversation

@MorganBerger
Copy link
Contributor

@MorganBerger MorganBerger commented Jan 23, 2026

Adds prevent methods for click events : onSubscribeClick, onLoginClick, onDataPolicyClick
& onDiscoveryLinkClick.
Working only for iOS so far.

⚠️ Since this modifications trigger a crash when trying to use the above listed events with the
current iOS SDK version, it would probably be a good idea to wait until Access IOS v2.10.1 is
available before releasing this.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a “prevent default” mechanism for several paywall click events (currently iOS-focused), allowing JS handlers to optionally block the native SDK’s default click behavior.

Changes:

  • Extend click events with _messageId / prevented and add JS-side prevent() handlers for click events.
  • Add iOS bridging to correlate click events with a JS response and conditionally invoke the native prevent() callback.
  • Update example app and iOS dependency versions to exercise the new behavior.

Reviewed changes

Copilot reviewed 6 out of 8 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
src/specs/PaywallViewNativeComponent.ts Extends ClickEvent payload to support preventable click actions.
src/Paywall/index.tsx Adds JS handler signatures that expose prevent() and sends resolve/reject messages back to native.
ios/PaywallView.mm Adds iOS-side observer wiring to call the SDK’s prevent() based on JS response.
ios/NativePaywallModule.mm Changes notification routing to be derived from the emitted JS event name.
RNAccessIOS.podspec Updates pinned AccessIOS dependency version.
example/src/App.tsx Demonstrates new click handlers and prevent calls.
example/ios/Podfile.lock Updates example iOS pods (including AccessIOS version and CocoaPods metadata).
example/Gemfile.lock Updates Ruby/Bundler/CocoaPods lock metadata for the example app.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@auto-update-cop
Copy link

⚠️ Cannot update branch : merge conflict between base and head - https://docs.github.com/rest/pulls/pulls#update-a-pull-request-branch

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.

1 participant

Comments