Change AdFailedToLoad mediatorErrorCode type from Long to Int#2924
Merged
Conversation
This improves the developer experience by accepting Int directly from ad networks like AdMob, which provide error codes as Int, rather than requiring developers to manually convert to Long. Changes: - AdFailedToLoadData.mediatorErrorCode: Long? -> Int? - AdEvent.FailedToLoad.mediatorErrorCode: Long? -> Int? - BackendEvent.Ad.mediatorErrorCode: Long? -> Int? - Updated all related tests to use Int values
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2924 +/- ##
=======================================
Coverage 78.49% 78.49%
=======================================
Files 332 332
Lines 12878 12878
Branches 1749 1749
=======================================
Hits 10108 10108
Misses 2036 2036
Partials 734 734 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
tonidero
approved these changes
Dec 12, 2025
tonidero
left a comment
Contributor
There was a problem hiding this comment.
Makes sense. Thanks for fixing!
tonidero
pushed a commit
that referenced
this pull request
Dec 15, 2025
**This is an automatic release.** > [!WARNING] > If you don't have any login system in your app, please make sure your one-time purchase products have been correctly configured in the RevenueCat dashboard as either consumable or non-consumable. If they're incorrectly configured as consumables, RevenueCat will consume these purchases. This means that users won't be able to restore them from version 9.0.0 onward. > Non-consumables are products that are meant to be bought only once, for example, lifetime subscriptions. ## RevenueCat SDK ### 📦 Dependency Updates * [RENOVATE] Update build-dependencies to v8.13.2 (#2929) via RevenueCat Git Bot (@RCGitBot) ## RevenueCatUI SDK ### 🐞 Bugfixes * Fix `IllegalStateException`: No `ViewModelStoreOwner` was provided via `LocalViewModelStoreOwner` in `CompatComposeView` (#2912) via Cesar de la Vega (@vegaro) ### 🔄 Other Changes * Change AdFailedToLoad mediatorErrorCode type from Long to Int (#2924) via Pol Miro (@polmiro) * Change paywall preview recorder name template (#2923) via Toni Rico (@tonidero) * Don't use reflection to instantiate AmazonDeviceIdentifiersFetcher (#2919) via Will Taylor (@fire-at-will) Co-authored-by: revenuecat-ops <ops@revenuecat.com>
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.
Problem
Ad networks like AdMob provide error codes as
Int, but theAdFailedToLoadevent'smediatorErrorCodeparameter expects aLong. This creates friction for developers who need to manually convert the error code type when tracking ad load failures:Solution
Changed
mediatorErrorCodetype fromLong?toInt?throughout the SDK to match the type that ad networks naturally provide.Changes
AdFailedToLoadData.mediatorErrorCode:Long?→Int?AdEvent.FailedToLoad.mediatorErrorCode:Long?→Int?BackendEvent.Ad.mediatorErrorCode:Long?→Int?IntvaluesTesting
Impact
Longvalues will need to remove the.toLong()conversion