- Ninth beta for RevenueCat framework 🎉
100% Swift framework + ObjC support.
- See our RevenueCat V4 API update doc for API updates.
Breaking changes:
identify
, previously deprecated, has been removed in favor oflogIn
.reset
, previously deprecated, has been removed in favor oflogOut
.Package.product
has been replaced withPackage.storeProduct
. This is an abstraction of StoreKit 1'sSKProduct
and StoreKit 2'sStoreKit.Product
, but it also adds useful features likepricePerMonth
andpriceFormatter
. The underlying objects from StoreKit are available throughStoreProduct.sk1Product
andStoreProduct.sk2Product
.
Xcode version requirements and updated deployment targets
purchases-ios
v4 requires using Xcode 13.2 or newer.
It also updates the minimum deployment targets for iOS, macOS and tvOS.
Minimum deployment targets
v3 | v4 | |
---|---|---|
iOS | 9.0 | 11.0 |
tvOS | 9.0 | 11.0 |
macOS | 10.12 | 10.13 |
watchOS | 6.2 | 6.2 (unchanged) |
StoreKit 2 support:
- This beta introduces new methods that add functionality using StoreKit 2:
showManageSuscriptions(completion:)
beginRefundRequest(forProduct:)
beginRefundRequest(forEntitlement:)
.beginRefundRequestForActiveEntitlement()
checkTrialOrIntroductoryPriceEligibility(productIdentifiers:completion:)
now uses StoreKit 2 if it's available, to make calculation more accurate and fast.- A new flag has been introduced to
setup
,useStoreKit2IfAvailable
(defaults tofalse
), to use StoreKit 2 APIs for purchases instead of StoreKit 1.
Async
/ Await
alternative APIs
- In purchases-ios v3,
Async
/Await
alternative APIs were made available through Xcode's auto-generation for Objective-C projects. This beta re-adds theAsync
/Await
alternative APIs for v4.
New APIs:
showManageSuscriptions(completion:)
: Use this method to show the subscription management for the current user. Depending on where they made the purchase and their OS version, this might take them to themanagementURL
, or open the iOS Subscription Management page.beginRefundRequestForCurrentEntitlement
: Use this method to begin a refund request for the purchase that granted the current entitlement.beginRefundRequest(forProduct:)
: Use this method to begin a refund request for a purchase, specifying the product identifier.beginRefundRequest(forEntitlement:)
: Use this method to begin a refund request for a purchase, specifying the entitlement identifier.- Adds an optional
useStoreKit2IfAvailable
parameter tosetup
(defaults tofalse
). If enabled, purchases will be done by using StoreKit 2 APIs instead of StoreKit 1. This is currently experimental, and not all features are supported with StoreKit 2 APIs. - Use
verboseLogHandler
orverboseLogs
to enable more details in logs, including file names, line numbers and method names.
Known issues:
- Promotional offers and deferred purchases are not currently supported with StoreKit 2. If your app uses either of those, you should omit
useStoreKit2IfAvailable
insetup
or set it tofalse
.
Other changes:
- There are lots of under the hood improvements. If you see any issues we'd appreciate bug reports!
To view new release, visit https://github.com/RevenueCat/purchases-ios/releases/tag/4.0.0-beta.9