Skip to content

feat(ads): ad reward tracking support - #1890

Open
peterporfy wants to merge 2 commits into
mainfrom
ads-266
Open

feat(ads): ad reward tracking support#1890
peterporfy wants to merge 2 commits into
mainfrom
ads-266

Conversation

@peterporfy

@peterporfy peterporfy commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

This change exposes the ad reward tracking functionality - which is just a new parameter for the polling function.

Do not merge until android and ios sdks are released with the feature.


Note

Medium Risk
Additive beta API on rewarded-ad verification with a native bridge contract that depends on matching iOS/Android SDK releases; existing single-argument call sites remain valid.

Overview
Adds an optional RewardedAdTrackingMetadata argument to Purchases.pollRewardVerification, so callers can attach rewarded-ad context (mediator, format, unit id, impression id, etc.) and have the native SDK automatically track reward-verification events during the poll. Omitting the parameter keeps the existing poll-only behavior.

The new type is exported from the public TS API, wired through Android and iOS bridges into hybrid CommonKt / RCCommonFunctionality, and the web stub signature is updated to accept the extra argument. API testers cover the new overload.

Reviewed by Cursor Bugbot for commit 9991b36. Bugbot is set up for automated code reviews on this repo. Configure here.

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@peterporfy
peterporfy marked this pull request as ready for review August 14, 2026 08:19
@peterporfy
peterporfy requested a review from a team as a code owner August 14, 2026 08:19
@peterporfy peterporfy added the pr:feat A new feature label Aug 14, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 9991b36. Configure here.

Comment thread ios/RNPurchases.m
resolve:(RCTPromiseResolveBlock)resolve
reject:(RCTPromiseRejectBlock)reject) {
[RCCommonFunctionality pollRewardVerificationWithClientTransactionId:clientTransactionId
trackingMetadata:trackingMetadata

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Missing NSNull mapping for metadata

Medium Severity

trackingMetadata is forwarded to RCCommonFunctionality without mappingNSNullToNil. That parameter is optional, and the TypeScript layer passes undefined when it is omitted, so the bridge can deliver NSNull instead of nil. Elsewhere in this file, nullable dictionaries and strings are mapped before reaching purchases-hybrid-common; without that, omitted metadata may be treated as a real dictionary or nested null fields like networkName / placement may remain as NSNull.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 9991b36. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:feat A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant