Platform Differences

Where Android and iOS behavior is not one-to-one in the KMP SDK.

Beta

The KMP SDK is in beta and its API may change between releases.

The KMP SDK's public API is identical on both platforms: one signature, no platform types, no expect/actual of your own. But it wraps two different native SDKs, and in a handful of places they do not offer the same thing.

This page is the complete list. Everything not mentioned here behaves the same on Android and iOS.

APIs that differ

APIBehavior
SuperwallDelegate.handleSuperwallDeepLinkiOS only. superwall-android has no equivalent delegate hook, so this is never invoked on Android.
Superwall.consume(purchaseToken)Android. Consumes a Play Billing purchase so it can be bought again. On iOS it echoes the token back unchanged.
IntegrationAttribute.FIREBASE_INSTALLATION_IDiOS only. superwall-android has no counterpart; setting it on Android is skipped and logs a warning. Every other IntegrationAttribute works on both.

That is the whole list of behavioral gaps. Notably, customer info is not on it. See below.

Options that only apply to one platform

Setting one of these on the other platform is harmless. It is ignored.

Android only

OptionWhat it does
SuperwallOptions.passIdentifiersToPlayStoreSends the raw appUserId to Play instead of a SHA-256 hash
SuperwallOptions.useMockReviewsEnables mock review functionality
PaywallOptions.preloadDeviceOverridesPer-device-tier overrides for shouldPreload
PaywallOptions.onBackPressedCallback for the hardware back button while a paywall shows

iOS only

OptionWhat it does
SuperwallOptions.shouldBypassAppTransactionCheckSkips the app transaction check on launch
SuperwallOptions.maxConfigRetryCountRetry attempts for fetching configuration (default 6)
PaywallOptions.shouldShowWebRestorationAlertOffers web restoration after a failed restore
PaywallOptions.shouldShowWebPurchaseConfirmationAlertConfirms a successful web checkout purchase

PaywallOptions.transactionBackgroundView works on both platforms, despite its KDoc saying "iOS only". superwall-android has the same option, and the KMP mapper wires it. SPINNER maps to the native spinner and NONE maps to the native null ("show nothing").

Delegate threading

This is the difference most likely to cause problems, because it is a runtime behavior rather than a missing method.

SuperwallDelegate callbacks are not forced onto the main thread. They arrive on whatever thread the native SDK called from, which splits cleanly:

HooksAndroidiOS
willPresentPaywall, didPresentPaywall, willDismissPaywall, didDismissPaywall, handleCustomPaywallAction, paywallWillOpenURL, paywallWillOpenDeepLinkMainMain
subscriptionStatusDidChange, customerInfoDidChange, userAttributesDidChange, willRedeemLink, didRedeemLinkBackgroundMain
handleSuperwallEvent, handleLogNot guaranteedMain

So the paywall lifecycle hooks are safe for UI work everywhere. The rest are not, on Android.

handleSuperwallEvent and handleLog have their own row because they are the least predictable. Neither adds a dispatcher hop on Android, so they run on whatever thread the SDK called from. handleLog is invoked inline wherever a log statement executes, which includes the main thread. handleSuperwallEvent inherits the context of the code that tracked the event. Usually that is a background thread, but do not rely on it in either direction: do not assume it is safe for UI, and do not assume it is off the main thread.

override fun handleSuperwallEvent(eventInfo: SuperwallEventInfo) {
    // Fine: forwarding to an analytics SDK.
    analytics.track(eventInfo.eventType.name)

    // NOT fine on Android: this is a background thread.
    // updateMyUi()
}

If you need UI from one of those, hop yourself, or collect a flow instead:

scope.launch(Dispatchers.Main) { updateMyUi() }

Collecting Superwall.subscriptionStatusFlow is usually the easier path when you want subscription changes to drive UI, but it is a plain StateFlow, so it delivers on your collector's context, not on main. Collect it from a main-dispatched scope (collectAsState, viewModelScope, lifecycleScope) and you are safe; collect it on Dispatchers.IO and you are not.

Two more things to plan for: delegate implementations should be thread-safe (the analytics hooks are not serialized against each other), and they run synchronously on an SDK thread, so blocking in one slows the SDK. Keep them short.

PaywallPresentationHandler closures and the register feature closure are a different story: those are delivered on the main thread on both platforms, deliberately, because they gate UI.

Install differences

The two platforms do not take the same amount of setup. See Install the SDK for the detail.

AndroidiOS
StepsOne Gradle dependencyGradle dependency plus the SuperwallKMPBridge Swift package
Manifest / project editsNone. The library manifest declares the paywall activity and the startup initializerKotlin framework must be exported with isStatic = true
Native SDKsuperwall-android 2.8.0, transitivelySuperwallKit 4.16.1, pinned exactly by the bridge
MinimumminSdk 26iOS 14

In-app paywall previews on Android

The KMP library manifest declares SuperwallPaywallActivity, which is what paywall presentation needs. It does not declare the debug activities that the standalone Android SDK's in-app paywall previews rely on, and neither does superwall-android.

If you need previews on Android, declare them in your own AndroidManifest.xml:

<activity android:name="com.superwall.sdk.debug.DebugViewActivity" />
<activity android:name="com.superwall.sdk.debug.localizations.SWLocalizationActivity" />
<activity android:name="com.superwall.sdk.debug.SWConsoleActivity" />

This path is not yet verified end-to-end on KMP. If you try it, we would like to hear how it goes, so please open an issue.

Getting the right API key

Your Android app and your iOS app are separate apps in the Superwall dashboard, and each one has its own Public API Key. In a KMP project, though, Superwall.configure is usually called once, from shared code. That single call site needs to end up with the Android key when the app runs on Android and the iOS key when it runs on iOS.

One way to do that is Kotlin's expect/actual:

// commonMain
expect val superwallApiKey: String

// androidMain
actual val superwallApiKey: String = "pk_your_android_key"

// iosMain
actual val superwallApiKey: String = "pk_your_ios_key"

// commonMain: one call site, correct key on each platform
Superwall.configure(apiKey = superwallApiKey)

This is the same pattern the sample app uses. Passing the key in from each platform's entry point works just as well; use whatever your project already does for per-platform values.

How is this guide?

On this page