Looking for RevenueCat v4 iOS SDK Beta testers 🎉

  • 15 September 2021
  • 3 replies

  • Anonymous
  • 0 replies

RevenueCat SDK 4.0.0-beta.1 is out 🎉

Hey all, some of you might know we’ve been hard at work migrating our mixed-language Purchases.framework to Swift. Well, we did it, and we’re excited to share it with you!

For context, here were our goals of the migration:

  • 🦶 Lowers our overall footprint for modules.

  • 🗣️ Unifies the language used for the entire SDK.

  • 🚤 Faster feature development, bug fixes on old logic, and integration through simplified SDK, CI, and testing infrastructure.

  • 🐐 Improve consistency among our API calls, classes, properties, etc.

  • :dollar: Enable us to implement StoreKit2 changes easier.

  • 🧑‍🏫 Easier onboarding for new members (internal and external).

You can find a more detailed breakdown of the motivations and our actual migration plan in our SwiftMigration.md.

We haven’t added any new features (yet), but we did update our API to be more idiomatic to Swift, fixed a few tiny bugs, and improved the safety of our API through fixing various nullability mismatches.

We’re planning on adding StoreKit2 improvements before officially shipping, so stay tuned for those additions. 

How can you help?

You can update to this beta and report your experience to us! We’re looking for any and all feedback, suggestions, and comments 😄

We feel really confident in our migrated SDK, but having you try it out and tell us it’s still performing how you expect it - even if everything is great, is really helpful to us.


We tried as hard as we could to retain the same API. Ironically, our ObjC interfaces are nearly exactly the same, the majority of our API changes were naming updates for Swift. There were some required changes (outlined in our API Changes doc), and the biggest being:

Renaming `Purchases` module to `RevenueCat` 😻

How to install the beta:

We launched a new pod: 

pod 'RevenueCat', '4.0.0-beta.1'

You can also use Carthage, and Swift Package Manager. For SPM, you’ll also want to point to the version `4.0.0-beta.1`

Make sure any imports of `Purchases` are switched to: `RevenueCat`.

Anticipated future updates before shipping V4:

  • 🔍 Adding a script that will help migrate your code for changed API.

  • 🏪 StoreKit2 support.

  • 🧱 ObjC/Swift block naming convention: changing all references of “completionBlock” to “completion” to be more consistent.


3 replies

Userlevel 1
Badge +2

found a new wierd issue, in beta.7 if you have a current offering without any package, you can see it by calling getOfferings, but not in rc.2 anymore you get nothing, and it’s not listed in ‘all’ object as it was before

Userlevel 1
Badge +2

I found a way, still not sure that the best : https://github.com/riderx/capacitor-purchases/blob/015b69851457671b221e90fcd502b1bc0472c4e9/ios/Plugin/CapacitorPurchasesPlugin.swift#L83

Userlevel 1
Badge +2

Hello, i have made a plugin for capacitor apps ( new cordova) using the V4 and it was working super well in beta.7 i just try to upgrade to rc-2 but got some issue i cannot resolve in StoreProductDiscount.

I made a swift extension to convert swift object to JSON but witht the rc-2 i’m unable to get :

-  numberOfPeriods
- priceLocale.currencyCode
- priceLocale.currencySymbol
See below my code:

@objc public extension StoreProductDiscount {

    var localizedPrice: String {

        let formatter = NumberFormatter()

        formatter.numberStyle = .currency

        formatter.locale = priceLocale

        return formatter.string(from: price)!


    @available(iOS 12.2, *)

    func toJson() -> [String: Any] {

        return [

            "identifier": offerIdentifier as Any,

            "type": type.rawValue,

            "price": price,

            "localizedPrice": localizedPrice,

            "currencySymbol": priceLocale.currencySymbol as Any,

            "currencyCode": priceLocale.currencyCode as Any,

            "paymentMode": paymentMode.rawValue,

            "numberOfPeriods": numberOfPeriods,

            "subscriptionPeriod": subscriptionPeriod.toJson(),



All look good otherwise, thanks for the work !