Releases: RevenueCat/purchases-hybrid-common
5.2.2
5.2.1
5.2.0
5.1.0
5.0.0
RevenueCat Purchases Hybrid Common v5 is here!! 😻
This latest release updates the Android SDK dependency from v5 to v6 to use BillingClient 5. This version of BillingClient brings an entire new subscription model which has resulted in large changes across the entire SDK.
Migration Guides
- See Android Native - 5.x to 6.x Migration for a more thorough explanation of the new Google subscription model announced with BillingClient 5 and how to take advantage of it in V6. This guide includes tips on product setup with the new model.
New SubscriptionOption
concept
Purchasing
In v4, a Google Play Android Package
or StoreProduct
represented a single purchaseable entity, and free trials or intro offers would automatically be applied to the purchase if the user was eligible.
Now, in Hybrid Common v5, an Google Play Android Package
or StoreProduct
represents a duration of a subscription and contains all the ways to purchase that duration -- any offers and its base plan. Each of these purchase options are SubscriptionOption
s.
When passing a Package
to purchasePackage()
or StoreProduct
to purchaseStoreProduct()
, the SDK will use the following logic to choose which SubscriptionOption
to purchase:
- Filters out offers with "rc-ignore-offer" tag
- Uses
SubscriptionOption
with the longest free trial or cheapest first phase- Only offers the user is eligible will be applied
- Falls back to base plan
For more control, purchase subscription options with the new purchaseSubscriptionOption()
method.
Models
StoreProduct
now has a few new properties use for Google Play Android:
defaultOption
- A subscription option that will automatically be applie when purchasing a
Package
orStoreProduct
- A subscription option that will automatically be applie when purchasing a
subscriptionOptions
- A list of subscription options (could be null)
Subscription Option
Below is an example of what a subscription option:
{
"id": "basePlan",
"storeProductId": "subId:basePlanId",
"productId": "subId",
"pricingPhases": [
{
"price": 0,
"priceString": "FREE",
"period": "P1M",
"cycles": 1
},
{
"price": 4.99,
"priceString": "$4.99",
"period": "P1M",
"cycles": 0
}
],
"tags": ["free-offers"],
"isBasePlan": false,
"billingPeriod": {
"periodUnit": "MONTH",
"periodNumberOfUnits": 0
},
"isPrepaid": false,
"fullPricePhase": {
"price": 4.99,
"priceString": "$4.99",
"period": "P1M",
"cycles": 0
},
"freePhase" {
"price": 0,
"priceString": "FREE",
"period": "P1M",
"cycles": 1
},
"introPhase": null
}
Observer Mode
Observer mode is still supported in v5. Other than updating the SDK version, there are no changes required.
Offline Entitlements
✨ With this new feature, even if our main and backup servers are down, the SDK can continue to process purchases. This is enabled transparently to the user, and when the servers come back online, the SDK automatically syncs the information so it can be visible in the dashboard.
Offering Metadata
✨ Metadata allows attaching arbitrary information as key/value pairs to your Offering to control how to display your products inside your app. The metadata you configure in an Offering is available from the RevenueCat SDK. For example, you could use it to remotely configure strings on your paywall, or even URLs of images shown on the paywall.
See the metadata documentation for more info!
5.0.0-rc.1
New Features
- Add offering metadata (#419) via Josh Holtz (@joshdholtz)
4.18.0
4.17.0
New Features
- Add metadata to offering for iOS (#415) via Josh Holtz (@joshdholtz)
- Remove
watchOS
as a supported platform (#411) via NachoSoto (@NachoSoto)
Dependency Updates
- [AUTOMATIC] iOS 4.19.0 => 4.20.0 (#409) via RevenueCat Git Bot (@RCGitBot)
- Bump fastlane from 2.212.2 to 2.213.0 (#407) via dependabot[bot] (@dependabot[bot])
Other Changes
CI
: changed Xcode 13 job to 13.4 (#410) via NachoSoto (@NachoSoto)- Xcode 14.3: fixed warning (#405) via NachoSoto (@NachoSoto)
4.16.0
4.15.0
Dependency Updates
- [AUTOMATIC] iOS 4.17.11 => 4.18.0 (#400) via RevenueCat Git Bot (@RCGitBot)
- Bump fastlane-plugin-revenuecat_internal from
8482a43
tofe4529988aa6dd9ec1d507950416091302e6f56e
(#392) via dependabot[bot] (@dependabot[bot]) - Bump danger from 9.2.0 to 9.3.0 (#397) via dependabot[bot] (@dependabot[bot])