Welcome

Welcome to the Superwall KMP SDK documentation

Beta

The KMP SDK is in beta. The API may change between releases, and these docs describe behavior that is still settling. If you hit something that does not match what you see, please open an issue.

The Superwall KMP SDK brings paywalls, placements, and entitlements to Kotlin Multiplatform. It wraps the native Superwall SDKs (superwall-android on Android, SuperwallKit on iOS) behind a single API that lives entirely in commonMain.

This means there's no expect/actual of your own, no platform types in your shared code, and an identical configure signature on both platforms. There is no Context parameter on Android.

import com.superwall.sdk.kmp.Superwall

Superwall.configure(apiKey = "pk_your_api_key")

Superwall.register(placement = "campaign_trigger") {
    launchTheFeature()
}

Platform support

PlatformSupportWraps
AndroidminSdk 26com.superwall.sdk:superwall-android 2.8.0
iOSiOS 14+ (iosArm64, iosSimulatorArm64, iosX64)SuperwallKit iOS 4.16.1, pinned exactly

Those are the only two targets. There are no JVM, JS, desktop, or watchOS artifacts since the SDK is a wrapper over two native SDKs.

Android's minSdk here is 26, higher than the standalone Android SDK's 23. If you are adding KMP to an existing project, check your minSdk before you start.

How it fits together

Your shared Kotlin code calls one API. Underneath, each platform resolves to its own native SDK:

  • Android wraps superwall-android directly. One Gradle dependency pulls it in, and an androidx.startup initializer captures the Application for you.
  • iOS forwards through SuperwallKMPBridge, an @objc Swift bridging layer over SuperwallKit that flattens Swift-only constructs (enum associated values, structs, async) into something Kotlin can consume via cinterop. Your app supplies that bridge as a Swift package.

Feedback

The KMP SDK is actively developed and we want to hear what is missing.

If you have feedback on these docs, please leave a rating and message at the bottom of the page. For SDK bugs, open an issue on GitHub.

Last updated for v0.1.1

How is this guide?

On this page