What is purchases-hybrid-common, and do I need to install it?

purchases-hybrid-common is the shared layer that the cross-platform SDKs (React Native, Flutter, Capacitor, Unity and Cordova) sit on. It turns their calls into calls on the native iOS and Android SDKs. You never install it yourself: your wrapper depends on it. Installing the RevenueDot SDK for React Native, Flutter, Capacitor, Unity or Cordova pulls in RevenueDot's build of it.

What it contains#

Part What it does RevenueDot fork package (version 19.4.1) Keeps the name
iOS layer Swift bridge over the iOS SDK pods RevenueDotPurchasesHybridCommon, RevenueDotPurchasesHybridCommonUI modules PurchasesHybridCommon, PurchasesHybridCommonUI
Android layer Kotlin bridge over the Android SDK Maven app.revenuedot.purchases:purchases-hybrid-common (and -ui) Kotlin packages
TypeScript types Shared types and enums such as ENTITLEMENT_VERIFICATION_MODE npm @revenuedot/purchases-typescript-internal and -esm installed through npm aliases, so imports stay @revenuecat/...
Web mappings Runs purchases-js in browser mode (Expo Go, React Native web, Flutter web) npm @revenuedot/purchases-js-hybrid-mappings installed through an npm alias

The fork is github.com/revenuedot/purchases-hybrid-common; release 19.4.1 is the tag 19.4.1-revenuedot, which Swift Package Manager also uses. Published: both pods on CocoaPods trunk, purchases-hybrid-common, -ui and -store-galaxy on Maven Central, and @revenuedot/purchases-typescript-internal and @revenuedot/purchases-js-hybrid-mappings and @revenuedot/purchases-typescript-internal-esm on npm.

Which wrappers use it#

Wrapper Native layer TypeScript or web packages Fork pin
React Native Yes purchases-typescript-internal, purchases-js-hybrid-mappings 19.4.1
Flutter Yes A copy of the web mappings for Flutter web 19.4.1
Capacitor Yes purchases-typescript-internal-esm 19.4.1
Unity Yes, through EDM4U none 19.4.1
Cordova Yes none 19.4.1

Kotlin Multiplatform does not use it: it builds on the iOS and Android SDKs directly. The native iOS, Android and web SDKs do not use it either.

How the forks fit together#

The RevenueDot forks pin each other, so a wrapper fork gets the RevenueDot builds all the way down:

  • The hybrid-common fork depends on RevenueDot's iOS fork (RevenueDotPurchases 5.91.0) and Android fork (app.revenuedot.purchases:purchases 10.23.0).
  • The web mappings depend on RevenueDot's purchases-js fork through an npm alias.
  • Every wrapper fork depends on hybrid-common 19.4.1.

Releases run in that order: iOS and Android first, then hybrid-common, then purchases-js and the web mappings, then the wrappers. All of them are published.

Apps that keep RevenueCat's SDK change nothing here#

  • You do nothing here. The wrapper's setProxyURL and verification option pass through hybrid-common to the native SDK.
  • With the stock wrappers, hybrid-common is RevenueCat's build, which trusts RevenueCat's signing key. That is why you turn verification off. See Trusted Entitlements.
Edit this page on GitHub ↗ View as Markdown Last updated