feat: rewarded ad sample app - #1897
Conversation
Generated by 🚫 Danger |
716265c to
eddc627
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ 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' | ||
| } |
There was a problem hiding this comment.
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.
Reviewed by Cursor Bugbot for commit eddc627. Configure here.
| unsubEarned(); | ||
| unsubError(); | ||
| unsubClosed(); | ||
| }); |
There was a problem hiding this comment.
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.
Reviewed by Cursor Bugbot for commit eddc627. Configure here.
eddc627 to
cf7ec8f
Compare



Adds a new
adsTestersample 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, callPurchases.generateRewardVerificationToken, passappUserID/customDatainto AdMobserverSideVerificationOptionsviareact-native-google-mobile-ads, then onEARNED_REWARDcallPurchases.pollRewardVerificationand 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-purchasesis resolved from the monorepo root through the same pattern aspurchaseTesterTypescript(Babel alias, MetrowatchFolders,react-native.config.jsautolinking), 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.