This latest release updates the Android SDK dependency from v7 to v8 to use BillingClient 7 and updates the iOS SDK dependency from v4 to v5 to use StoreKit 2 by default in the SDK.
If you're coming from KobanKat, make sure you follow the KobanKat migration guide first.
Caution
You must configure your In-App Purchase Key in the RevenueCat dashboard. Purchases will fail if the key is not configured. This is a new requirement for all RevenueCat SDKs.
- See Android Native - V8 API Migration Guide for a more thorough explanation of the Android changes.
- See iOS Native - V5 Migration Guide for a more thorough explanation of the iOS changes. Notably, this version uses StoreKit 2 to process purchases by default.
This release raises the minimum required OS versions to the following:
- iOS 13.0
- Android: SDK 21 (Android 5.0)
When configuring the SDK, you may specify which StoreKit version storeKitVersion: StoreKitVersion
value. It defaults to letting the iOS SDK determine the most appropriate version of StoreKit at runtime. If you'd like to use a specific version of StoreKit, you may provide a value for storeKitVersion
like so:
val config: PurchasesConfiguration = PurchasesConfiguration(apiKey = {YOUR_API_KEY}) {
storeKitVersion = StoreKitVersion.STOREKIT_2
}
Purchases.configure(config)
PurchasesAreCompletedBy
is now a sealed interface instead of an enum, with two types: RevenueCat
and MyApp
. When specifying MyApp, you must now provide the StoreKit version you are using to process purchases on iOS. If your app is Android-only, you may provide any value since it is ignored on Android.
You can set purchasesAreCompletedBy
to MyApp
when configuring the SDK like so:
val configuration = PurchasesConfiguration(apiKey = {YOUR_API_KEY}) {
purchasesAreCompletedBy = PurchasesAreCompletedBy.MyApp(StoreKitVersion.STOREKIT_2)
}
Purchases.configure(configuration)
If purchases are completed by your app using StoreKit 1, you will need to explicitly configure the SDK to use StoreKit 1:
val configuration = PurchasesConfiguration(apiKey = {YOUR_API_KEY}) {
purchasesAreCompletedBy = PurchasesAreCompletedBy.MyApp(StoreKitVersion.STOREKIT_1)
}
Purchases.configure(configuration)
The getter and setter on Purchases.sharedInstance.purchasesAreCompletedBy
has been removed. Please reach out to us if this is something you've been using and need to continue using.
PurchasesConfiguration.pendingTransactionsForPrepaidPlansEnabled
: Enable this setting if you want to allow pending purchases for prepaid subscriptions (only supported in Google Play). Note that entitlements are not granted until payment is done. Default is disabled.SubscriptionOption.InstallmentsInfo
: Type containing information of installment subscriptions. Currently only supported in Google Play.
If you're migrating to the stable 1.0.0
or newer, make sure to follow
the 1.0.0
migration guide next.
Feel free to file an issue! New RevenueCat Issue.