Expose trackCustomPaywallImpression as experimental public API#3199
Conversation
495835c to
b58bc1e
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3199 +/- ##
==========================================
- Coverage 79.19% 79.18% -0.01%
==========================================
Files 356 356
Lines 14272 14273 +1
Branches 1945 1945
==========================================
Hits 11302 11302
- Misses 2165 2166 +1
Partials 805 805 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Autofix Details
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Missing
@JvmOverloadsfor Java callers with default parameter- Added
@JvmOverloadstotrackCustomPaywallImpressionso Java callers get a zero-argument overload when using default params.
- Added
Or push these changes by commenting:
@cursor push f50804ba11
Preview (f50804ba11)
diff --git a/purchases/src/defaults/kotlin/com/revenuecat/purchases/Purchases.kt b/purchases/src/defaults/kotlin/com/revenuecat/purchases/Purchases.kt
--- a/purchases/src/defaults/kotlin/com/revenuecat/purchases/Purchases.kt
+++ b/purchases/src/defaults/kotlin/com/revenuecat/purchases/Purchases.kt
@@ -653,6 +653,7 @@
*/
@ExperimentalPreviewRevenueCatPurchasesAPI
@OptIn(InternalRevenueCatAPI::class)
+ @JvmOverloads
public fun trackCustomPaywallImpression(params: CustomPaywallEventParams = CustomPaywallEventParams()) {
purchasesOrchestrator.track(
CustomPaywallEvent.Impression(
tonidero
left a comment
There was a problem hiding this comment.
I think this looks good! Just some small comments
b58bc1e to
4374ce2
Compare
4374ce2 to
01bb7fa
Compare
ddfda04 to
3896706
Compare
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, enable autofix in the Cursor dashboard.
**This is an automatic release.** ## RevenueCat SDK ### ✨ New Features * Expose trackCustomPaywallImpression as experimental public API (#3199) via Rick (@rickvdl) ### 🔄 Other Changes * [EXTERNAL] Migrate deprecated kotlinOptions to compilerOptions (#3219) contributed by @AlexanderTalledo (#3223) via Toni Rico (@tonidero) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk release bookkeeping: bumps version strings and updates docs/changelogs and CI docs deploy paths, without changing runtime logic beyond version reporting. > > **Overview** > Publishes the `9.25.0` release by removing `-SNAPSHOT` across the repo (Gradle `VERSION_NAME`, internal `Config.frameworkVersion`, and sample/test app dependency version catalogs). > > Updates release documentation metadata: adds `9.25.0` to `CHANGELOG.md`, refreshes `CHANGELOG.latest.md`, points `docs/index.html` to `9.25.0`, and changes CircleCI `docs-deploy` to sync docs to the `9.25.0` S3 path. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit e8615d4. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
## Description Adds bridge methods for `trackCustomPaywallImpression` on both iOS and Android, enabling hybrid SDKs to call the new experimental native API. ### Changes - iOS: `trackCustomPaywallImpression(_ data:)` in `CommonFunctionality.swift` - Android: `trackCustomPaywallImpression(data)` in `common.kt` Both methods accept a dictionary with an optional `paywallId` key and delegate to the native SDK. ### Related PRs - purchases-ios: RevenueCat/purchases-ios#6427 - purchases-android: RevenueCat/purchases-android#3199 - react-native-purchases: RevenueCat/react-native-purchases#1660
## Summary - Add `trackCustomPaywallImpression` API to the Unity SDK, wiring through the existing hybrid-common bridge on both iOS and Android - Introduce `CustomPaywallImpressionParams` class with an optional `PaywallId` - Pass `CustomPaywallImpressionParams` through the wrapper interface, splitting into separate arguments only at the native bridge boundary - Add a testing UI in the Subtester app's Paywall screen with an optional paywall ID field ## Changes - **New file:** `CustomPaywallImpressionParams.cs` — params class with optional `PaywallId` - **Interface:** `IPurchasesWrapper` — added `TrackCustomPaywallImpression(CustomPaywallImpressionParams)` - **Public API:** `Purchases.cs` — two overloads (with params, parameterless) - **iOS bridge:** `PurchasesWrapperiOS.cs` + `PurchasesUnityHelper.m` — DllImport and ObjC bridge calling `[RCCommonFunctionality trackCustomPaywallImpression:]` - **Android bridge:** `PurchasesWrapperAndroid.cs` + `PurchasesWrapper.java` — CallPurchases and static method calling `CommonKt.trackCustomPaywallImpression()` - **No-op:** `PurchasesWrapperNoop.cs` — empty stub - **API tests:** `PurchasesAPITests.cs` — compile-time verification of both overloads - **Subtester:** `PaywallScreen.cs` — "Custom Paywall Events" section with paywall ID field and button ### Related PRs - purchases-ios: RevenueCat/purchases-ios#6427 - purchases-android: RevenueCat/purchases-android#3199 - purchases-hybrid-common: RevenueCat/purchases-hybrid-common#1537 - react-native-purchases: RevenueCat/react-native-purchases#1660 - purchases-flutter: RevenueCat/purchases-flutter#1679 - purchases-capacitor: RevenueCat/purchases-capacitor#725 --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: Rick van der Linden <rick.vanderlinden@revenuecat.com>
## Summary - Add `trackCustomPaywallImpression` API to React Native, enabling developers to track impressions of custom (non-RevenueCat) paywalls for analytics - Add purchase tester demo screen for testing custom paywall impressions ## Changes - **iOS bridge:** `RCT_EXPORT_METHOD(trackCustomPaywallImpression:)` in `RNPurchases.m` - **Android bridge:** `@ReactMethod trackCustomPaywallImpression` in `RNPurchasesModule.java` - **TypeScript:** `Purchases.trackCustomPaywallImpression()` in `purchases.ts` with optional `paywallId` parameter - **Purchase tester:** Added a demo Custom Paywall screen for testing impressions ### Related PRs - purchases-ios: RevenueCat/purchases-ios#6427 - purchases-android: RevenueCat/purchases-android#3199 - purchases-hybrid-common: RevenueCat/purchases-hybrid-common#1537 - purchases-flutter: RevenueCat/purchases-flutter#1679 - purchases-capacitor: RevenueCat/purchases-capacitor#725
…PI (#1565) ## Summary - Read `offeringId` from the data dictionary in `trackCustomPaywallImpression` on both iOS and Android bridge layers - Pass it through to the native `CustomPaywallImpressionParams`, allowing hybrid SDKs to override the default offering identifier ## Related PRs - purchases-ios: RevenueCat/purchases-ios#6427 - purchases-android: RevenueCat/purchases-android#3199 - react-native-purchases: RevenueCat/react-native-purchases#1660 - purchases-unity: RevenueCat/purchases-unity#863

Description
Exposes
trackCustomPaywallImpressionas an experimental public API, allowing hybrid SDKs and consumers to track impressions of custom (non-RevenueCat) paywalls.Changes
CustomPaywallEventParamsclass gated behind@ExperimentalPreviewRevenueCatPurchasesAPItrackCustomPaywallImpressionmethod onPurchasesRelated PRs
Note
Medium Risk
Introduces new public (experimental) API surface on
Purchases, which can affect binary compatibility and downstream integrations if the signature or opt-in semantics change.Overview
Exposes
Purchases.trackCustomPaywallImpressionas an experimental public API (with overloads) to let apps track impressions for custom/non-RevenueCat paywalls, accepting optionalpaywallIdvia the newCustomPaywallImpressionParamstype.Replaces the prior internal params type, updates API tester coverage (Java/Kotlin) to exercise the new calls, and refreshes Metalava API surface files and unit tests accordingly.
Written by Cursor Bugbot for commit 3896706. This will update automatically on new commits. Configure here.