Skip to content

chore: add logging to reward verification#6745

Merged
peterporfy merged 6 commits into
mainfrom
admob-ssv-logging
May 7, 2026
Merged

chore: add logging to reward verification#6745
peterporfy merged 6 commits into
mainfrom
admob-ssv-logging

Conversation

@peterporfy

@peterporfy peterporfy commented May 7, 2026

Copy link
Copy Markdown
Contributor

Add logging to the AdMob RewardVerification subsystem

Introduces RewardVerificationStrings — a LogMessage-conforming enum following the core SDK convention — and adds log lines at every meaningful lifecycle point in the SSV pipeline.

Checklist

  • If applicable, unit tests
  • If applicable, create follow-up issues for purchases-android and hybrids

Note

Low Risk
Primarily adds log statements and centralized message strings; behavior changes are limited to extra logging on cancellation/suppressed delivery paths and a warning when Purchases is not configured.

Overview
Adds a centralized RewardVerificationStrings (LogMessage) set and wires structured logging throughout the AdMob reward verification (SSV) lifecycle.

Setup.install now warns when the RevenueCat SDK isn’t configured, logs successful installation (ad type + transaction ID), and logs/raises an assertion with a clearer message if customRewardText encoding fails. The polling loop (Poller.run) logs start/attempts/statuses, differentiates transient vs terminal errors, and warns when attempts are exhausted.

Dispatcher.run now logs when outcome delivery is cancelled or suppressed (token already consumed) and logs the delivered outcome before invoking the handler; the old RewardVerification/Strings.swift helper was removed in favor of the new logging strings.

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

@peterporfy peterporfy force-pushed the admob-ssv-logging branch from 7c1f45c to dfa311c Compare May 7, 2026 09:26
@peterporfy peterporfy marked this pull request as ready for review May 7, 2026 09:28
@peterporfy peterporfy requested a review from a team as a code owner May 7, 2026 09:28
@peterporfy peterporfy requested a review from polmiro May 7, 2026 09:28
case let .outcome_delivered(outcome, transactionID):
return "SSV outcome \(outcome) transactionID=\(transactionID)"
case let .outcome_suppressed(transactionID):
return "SSV outcome suppressed (token already consumed) transactionID=\(transactionID)"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We recently changed the code naming from "SSV" to "Reward Verification". Do we want to keep the "SSV" naming in the logs?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

renamed them

@polmiro polmiro left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@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 ace2381. Configure here.

@peterporfy

Copy link
Copy Markdown
Contributor Author

@RCGitBot please test

@peterporfy peterporfy merged commit ea80cdd into main May 7, 2026
42 checks passed
@peterporfy peterporfy deleted the admob-ssv-logging branch May 7, 2026 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants