Add optional support for setting obfuscated account id to product changes#3428
Conversation
| // only when explicitly opted in via DangerousSettings | ||
| if (applyObfuscatedAccountIdToSubscriptionChanges) { | ||
| setObfuscatedAccountId(appUserID.sha256()) | ||
| } |
There was a problem hiding this comment.
A lot of dangerous settings plumbing and tests but here's the 3 important lines of the PR
tonidero
left a comment
There was a problem hiding this comment.
Just some docs comments, but this looks great!
| * Enable this setting to set the Google Play `obfuscatedAccountId` when performing subscription product | ||
| * changes (upgrades or downgrades). Default is disabled. | ||
| */ | ||
| public fun applyObfuscatedAccountIdToSubscriptionChanges(enabled: Boolean): Builder { |
There was a problem hiding this comment.
Hmm I wonder if we should set this as an @ExperimentalPreviewRevenueCatPurchasesAPI API even if only used in CEC mode... It would make usage a bit harder, but would make it clearer about the dangerous nature of this option.
Separately, maybe it's worth adding some big warnings to the docs above of the downsides of enabling this option?
|
Seems there is some plumbing missing for tests |
Regenerate the entitlement API signature so it reflects the new experimental subscription-change obfuscated account ID builder method. Co-authored-by: Cursor <cursoragent@cursor.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3428 +/- ##
==========================================
+ Coverage 79.45% 79.47% +0.01%
==========================================
Files 362 362
Lines 14539 14547 +8
Branches 1976 1977 +1
==========================================
+ Hits 11552 11561 +9
Misses 2190 2190
+ Partials 797 796 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
**This is an automatic release.** ## RevenueCat SDK ### ✨ New Features * Add optional support for setting obfuscated account id to product changes (RevenueCat#3428) via Mark Villacampa (@MarkVillacampa) ## RevenueCatUI SDK ### Paywallv2 #### ✨ New Features * Add slide transition to workflow paywalls (RevenueCat#3418) via Cesar de la Vega (@vegaro) * Workflow state & ViewModel infrastructure (RevenueCat#3416) via Cesar de la Vega (@vegaro) #### 🐞 Bugfixes * Fix paywall layout direction for RTL locale overrides (PWENG-39) (RevenueCat#3425) via Monika Mateska (@MonikaMateska) * Apply ripple shape clip on a sibling Box to avoid clipping content (RevenueCat#3395) via Toni Rico (@tonidero) ### 🔄 Other Changes * build(deps): bump fastlane-plugin-revenuecat_internal from `21e02ec` to `af7bb5c` (RevenueCat#3442) via dependabot[bot] (@dependabot[bot]) * Abstract workflow page transition animation behind sealed class (RevenueCat#3430) via Cesar de la Vega (@vegaro) * Add `single_step_fallback_id` field to `PublishedWorkflow` (RevenueCat#3436) via Cesar de la Vega (@vegaro) * build(deps): bump fastlane-plugin-revenuecat_internal from `2d11430` to `21e02ec` (RevenueCat#3429) via dependabot[bot] (@dependabot[bot]) * Generalize `PaywallComponentsScaffold` for workflow reuse (RevenueCat#3417) via Cesar de la Vega (@vegaro) * perf: pre-warm workflow paywall step states off-thread (RevenueCat#3420) via Cesar de la Vega (@vegaro) * Update baseline profiles (RevenueCat#3427) via RevenueCat Git Bot (@RCGitBot) * build(deps): bump fastlane-plugin-revenuecat_internal from `d24ab26` to `2d11430` (RevenueCat#3426) via dependabot[bot] (@dependabot[bot]) * Replace unauthenticated SDKMAN install with SHA-pinned orb command (RevenueCat#3407) via Rick (@rickvdl) * Auto load paywall in paywall tester via local.properties (RevenueCat#3405) via Cesar de la Vega (@vegaro) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk: this is a version/release cut that mainly updates version strings, changelogs, and doc deployment targets with no functional logic changes beyond version identifiers. > > **Overview** > Cuts the `10.4.0` release by removing `-SNAPSHOT` across the project (core `VERSION_NAME`, `Config.frameworkVersion`, sample/test app dependency versions, and the root `.version` file). > > Updates release collateral and publishing to point at `10.4.0`, including changelogs (`CHANGELOG.md`/`CHANGELOG.latest.md`), docs redirect (`docs/index.html`), and the CircleCI `docs-deploy` S3 sync path (from `10.4.0-SNAPSHOT` to `10.4.0`). > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit f7b3604. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
Checklist
purchases-iosand hybridsMotivation
Description
Note
Medium Risk
Touches Google Play billing purchase-flow construction for subscription upgrades/downgrades; while gated behind an opt-in flag (default off), incorrect use could cause product change failures or behavior differences during billing flows.
Overview
Adds an experimental, opt-in configuration (
applyObfuscatedAccountIdToSubscriptionChanges) for Custom Entitlements Computation mode that propagates intoDangerousSettings/AppConfigand down into Google Play billing.When enabled,
BillingWrapperwill also setobfuscatedAccountIdduring subscription product changes (upgrade/downgrade) instead of omitting it; API testers and unit tests were updated to cover the new flag and its default/propagation behavior.Reviewed by Cursor Bugbot for commit be2974b. Bugbot is set up for automated code reviews on this repo. Configure here.