Add reward verification support to AdMobIntegrationSample example app#6746
Merged
Conversation
828df58 to
940843e
Compare
Unify rewarded sample flows around a single load/show interaction with a reward verification toggle, and make result states clearer and more stable during loading and mode changes. Update adapter and sample docs to match the new reward verification behavior and terminology.
Invalidate in-flight rewarded and rewarded interstitial loads when mode changes so outdated completion handlers can’t overwrite current UI state or loaded mode. Also clear opposite result fields on successful load to keep the result card consistent with the active mode.
Simplify rewarded loading copy and keep reward verification states clearer by removing misleading interim dismissal messaging. Add animated ellipsis in pending result cards so loading and verification progress are more obvious.
Tighten rewarded result messaging for load and verification outcomes, remove the mode-change prompt, and improve multiline card readability with added line spacing.
Remove terminal periods from rewarded load-state messages for consistency, and keep verification-mode dismissal transitions aligned with ongoing backend polling.
Show a no-reward-earned warning when verification-mode ads are dismissed before reward callbacks, and improve result card rendering so multi-line verified outcomes are easier to scan while keeping reward values visually prominent.
5427a40 to
c04b268
Compare
peterporfy
reviewed
May 8, 2026
peterporfy
reviewed
May 8, 2026
Contributor
peterporfy
left a comment
There was a problem hiding this comment.
LGTM - just one comment regarding example simplification
Break the example app's monolithic AdMob manager into per-format managers to make each integration path easier to review and copy. Keep placement and ad-unit values colocated with each manager to favor local, example-first readability.
Group the example app's ad managers under `Sources/AdManagers` with a `Support` subfolder so format-specific integration code is easier to navigate. Update project and docs paths to match the new layout without changing behavior.
Use `message` naming for sample ad manager UI strings to better communicate that these are display messages rather than formal state enums. Update HomeView bindings and helper signatures to keep naming consistent.
Use separate managers for native and native video formats so each integration path is easier to read and copy. Reduce branching in native ad loading and delegate handling while keeping behavior unchanged.
Separate verified and non-verified rewarded paths into dedicated managers to make each integration flow easier to read and copy in the sample app. Simplify manager logic by removing mode-branching and request-id invalidation from these examples.
Rename the rewarded flow dismiss guard flag to shouldReportDismissedBeforeReward so its intent remains clear after verification starts.
Read API key, proxy URL, and all ad unit IDs from optional local build settings while preserving committed defaults in source so developers can test locally without creating tracked diffs.
6d8dc0c to
2996b94
Compare
This reverts commit 2996b94.
b165908 to
5c5e325
Compare
Move the AdMob integration sample to a typed Message model with explicit severity/loading metadata so card tinting and button state no longer depend on string or emoji parsing.
Member
Author
|
@RCGitBot please test |
Reset the loaded rewarded and rewarded-interstitial ad references as soon as verification finishes so failed verification outcomes can't leave stale ads showable.
ajpallares
reviewed
May 11, 2026
…n result" This reverts commit 9aec82c.
ajpallares
reviewed
May 11, 2026
Member
ajpallares
left a comment
There was a problem hiding this comment.
I think it looks great! Good job! I have some comments though
…tion-sample-parity
Ensure SwiftUI updates canShow-driven button states by publishing the backing ad references used by the sample ad managers.
Use Message.isLoading directly for loading animation rendering and remove redundant string-based helper logic.
Split verification result fallback into explicit unsupported reward handling and a separate unhandled reward-type fallback message.
Use an explicit optional placement placeholder in reward verification present examples to avoid implying the override is required.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ 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 9aad5e6. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Checklist
purchases-androidand hybridsMotivation
Add explicit Reward Verification support to the AdMob integration example app so developers can try both rewarded flows (with and without verification) from a clear, production-like sample UX.
Description
AdMobIntegrationSample.LoadandShowflow per rewarded format.Sample architecture cleanup
While iterating on the rewarded flow the example app was reorganized to keep each ad format easy to read and copy:
Sources/AdManagers/, with separate verified and non-verified rewarded managers and an explicitisWaitingForRewardflag tracking dismiss vs. reward outcome.Sources/DetailViews/, withHomeViewreduced to a list and a per-format router.Sources/Support/Messages.swift; reusable view components (StatusAndButtons,RewardedControls,ResultCard,BannerAdView,NativeAdViewRepresentable,RootViewController) live underSources/Components/andSources/Support/.message: String?so views render throughResultCardonly when there is something to report; reward outcomes persist after the ad is dismissed instead of flashing back to a "Not Loaded" placeholder.Screenshots
Copies and design might be slightly outdated.
Rewarded ad with reward verification

Rewarded interstitial ad with reward verification

Rewarded ad with failed reward verification: simulated using ad unit configured without SSV in AdMob Dashboard

Note
Medium Risk
Touches multiple ad-format integration paths and presentation state handling in the sample app, including new reward verification presentation callbacks, which could change event tracking behavior if miswired. Changes are isolated to sample/demo code and documentation, limiting production impact.
Overview
Adds Reward Verification support to the AdMob integration sample for both rewarded formats, including a UI toggle to load/show ads with or without verification and richer result/status reporting.
Refactors the sample from a single
AdMobManagerinto per-format*AdManagerclasses plus per-format detail views and shared UI components (ResultCard,StatusAndButtons,RewardedControls), and moves ad unit IDs out ofConstantsinto each manager.Updates the sample and adapter READMEs to document the verification-enabled flow (
enableRewardVerification()+present(...rewardVerificationStarted:/rewardVerificationResult:)) and clarifies error-testing and test ID guidance.Reviewed by Cursor Bugbot for commit 9aad5e6. Bugbot is set up for automated code reviews on this repo. Configure here.