Skip to content

feat: rewarded ad sample app - #1897

Open
peterporfy wants to merge 3 commits into
mainfrom
ads-296-sample
Open

feat: rewarded ad sample app#1897
peterporfy wants to merge 3 commits into
mainfrom
ads-296-sample

Conversation

@peterporfy

@peterporfy peterporfy commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Adds a new adsTester sample app, which will potentially gain more ad related examples. First, I added it to the existing tester app, but it would have required multiple changes and extra dependencies which are probably not that relevant for most of the users, so I thought it is cleaner to have it separately for now.


Note

Low Risk
Adds example-only code under examples/ with no changes to the published SDK or core library behavior.

Overview
Introduces examples/adsTester, a separate React Native sample (not wired into the main purchase tester) so ad-specific deps stay isolated.

The app walks through rewarded-ad server-side verification: assign an impressionId, call Purchases.generateRewardVerificationToken, pass appUserID / customData into AdMob serverSideVerificationOptions via react-native-google-mobile-ads, then on EARNED_REWARD call Purchases.pollRewardVerification and show the verified reward on screen. It ships with Google test AdMob IDs and a placeholder RevenueCat API key; the README notes verification will fail until real keys, SSV URL, and dashboard reward rules are configured.

react-native-purchases is resolved from the monorepo root through the same pattern as purchaseTesterTypescript (Babel alias, Metro watchFolders, react-native.config.js autolinking), so the example always runs against branch SDK code. The rest of the diff is standard RN 0.86 iOS/Android project scaffolding plus a short README for running on simulator/device.

Reviewed by Cursor Bugbot for commit cf7ec8f. 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.

@RevenueCat-Danger-Bot

RevenueCat-Danger-Bot commented Aug 11, 2026

Copy link
Copy Markdown
1 Error
🚫 This PR increases the size of the repo by more than 250.00 KB (increased by 377.28 KB).
1 Message
📖 You can bypass the size check failure by adding the label "danger-bypass-size-limit". Please exercise caution.

Generated by 🚫 Danger

@peterporfy peterporfy added the pr:other A code change that improves performance label Aug 11, 2026 — with Graphite App
@peterporfy
peterporfy marked this pull request as ready for review August 14, 2026 08:02
@peterporfy
peterporfy requested a review from a team as a code owner August 14, 2026 08:02

@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 2 potential issues.

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 eddc627. Configure here.

storePassword 'android'
keyAlias 'androiddebugkey'
keyPassword 'android'
}

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 Android debug keystore

High Severity

Debug signing points at android/app/debug.keystore, but that file is not in the sample (unlike purchaseTesterTypescript and MagicWeather). yarn android fails at signing before the app can run.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit eddc627. Configure here.

unsubEarned();
unsubError();
unsubClosed();
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stuck UI after early dismiss

Medium Severity

The CLOSED handler only unsubscribes listeners. If the user dismisses the ad without earning a reward, EARNED_REWARD never runs, so ready stays false and the button remains disabled until the app is restarted.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit eddc627. Configure here.

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

Labels

pr:other A code change that improves performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants