Skip to content

Conversation

tonidero
Copy link
Contributor

Description

This adds a small migration guide for SDK V9

@tonidero tonidero requested a review from a team July 10, 2025 11:43
Copy link
Member

@ajpallares ajpallares left a comment

Choose a reason for hiding this comment

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

Thanks for updating this! Looks good, only some small corrections

Co-authored-by: Antonio Pallares <ajpallares@users.noreply.github.com>
Copy link
Member

@JayShortway JayShortway left a comment

Choose a reason for hiding this comment

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

Thanks for doing this! Some minor suggestions.

Copy link

codecov bot commented Jul 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.73%. Comparing base (298c8b5) to head (3eecf9a).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2508   +/-   ##
=======================================
  Coverage   78.73%   78.73%           
=======================================
  Files         289      289           
  Lines       10602    10602           
  Branches     1494     1494           
=======================================
  Hits         8347     8347           
  Misses       1607     1607           
  Partials      648      648           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

tonidero and others added 2 commits July 10, 2025 14:47
Co-authored-by: JayShortway <29483617+JayShortway@users.noreply.github.com>
@tonidero tonidero enabled auto-merge July 10, 2025 12:47
@tonidero tonidero added this pull request to the merge queue Jul 10, 2025
Merged via the queue into main with commit 4572e3a Jul 10, 2025
14 checks passed
@tonidero tonidero deleted the add-v9-migration-guide branch July 10, 2025 13:55
@tonidero tonidero mentioned this pull request Jul 10, 2025
tonidero added a commit that referenced this pull request Jul 10, 2025
## RevenueCat SDK
This release updates the SDK to use Google Play Billing Library 8. This
version of the Billing Library removed APIs to query for expired
subscriptions and consumed one-time products, aside from other
improvements. You can check the full list of changes here:
https://developer.android.com/google/play/billing/release-notes#8-0-0

Additionally, we've also updated Kotlin to 2.0.21 and our new minimum
version is Kotlin 1.8.0+. If you were using an older version of Kotlin,
you will need to update it.

Regarding API changes, we've also removed data classes from our public
APIs. This means that for classes that were previously data classes, the
`copy` function and `componentN` functions (destructuring declarations)
have been removed. `equals` and `hashCode` functions still work as
before.

### Play Billing Library 8: No expired subscriptions or consumed
one-time products

**Note:** the following is only relevant if you recently integrated
RevenueCat, and do not (yet) have all your transactions imported.
  
Play Billing Library 8 removed functionality to query expired
subscriptions or consumed one-time products. This means that, for users
migrating from a non-RevenueCat implementation of the Play Billing
Library, the SDK will not be able to send purchase information from
these purchases. We can still ingest historical data from these
purchases through a backend historical import. See
[docs](https://www.revenuecat.com/docs/migrating-to-revenuecat/migrating-existing-subscriptions).
This doesn't affect developers that have all transactions in RevenueCat,
which is true for the vast majority.

### Bumped minimum Kotlin version

RevenueCat SDK v9 bumps Kotlin to 2.0.21, with a minimum Kotlin version
of 1.8.0.

### Using the SDK with your own IAP code (previously Observer Mode)

Using the SDK with your own IAP code is still supported in v9. Other
than updating the SDK version, there are no changes required. Just make
sure the version of the Play Billing Library is also version 8.0.0+.

### 💥 Breaking Changes
* Removes data classes from public API (#2498) via JayShortway
(@JayShortway)
* Marks `PaywallData` and `PaywallColor` as `InternalRevenueCatAPI`.
(#2507) via JayShortway (@JayShortway)
* BC8 migration (#2506) via Toni Rico (@tonidero)
* Update to kotlin 2.0.21 while keeping language compatibility (#2493)
via Toni Rico (@tonidero)

### 🔄 Other Changes
* Update CustomEntitlementComputation sample app kotlin version (#2510)
via Toni Rico (@tonidero)
* Fix `Switch` component previews (#2509) via Toni Rico (@tonidero)
* Add V9 migration guide (#2508) via Toni Rico (@tonidero)
* [AUTOMATIC][Paywalls V2] Updates paywall-preview-resources submodule
(#2499) via RevenueCat Git Bot (@RCGitBot)

---------

Co-authored-by: JayShortway <29483617+JayShortway@users.noreply.github.com>

### Play Billing Library 8: No expired subscriptions or consumed one-time products

**Note:** the following is only relevant if you recently integrated RevenueCat, and do not (yet) have all your transactions imported.
Copy link
Member

Choose a reason for hiding this comment

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

I'm late to the game here, but what is "recently" in this context? this migration guide will live for a long time. Maybe we can tie it to a real-life date, even if arbitrary?

Copy link
Member

Choose a reason for hiding this comment

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

Hmm right, "recently" is in relation to the act of upgrading to v9. So if you're upgrading to v9 soon after integrating RevenueCat for the first time, and not all transactions are imported (yet). Maybe something like this is already better?

Suggested change
**Note:** the following is only relevant if you recently integrated RevenueCat, and do not (yet) have all your transactions imported.
**Note:** the following is only relevant if you recently integrated RevenueCat before upgrading to v9, and do not (yet) have all your transactions imported.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, I don't think we can tie it to a specific date unfortunately, though it will become less relevant over time. I think @JayShortway's suggestion makes sense! Will make a PR with it.

github-merge-queue bot pushed a commit that referenced this pull request Jul 11, 2025
### Description
As suggested in
#2508 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants