configure

fun configure(applicationContext: Application, apiKey: String, purchaseController: PurchaseController? = null, options: SuperwallOptions? = null, activityProvider: ActivityProvider? = null, completion: (Result<Unit>) -> Unit? = null)(source)

Configures a shared instance of Superwall for use throughout your app.

Call this as soon as your app finishes launching in onCreate in your MainApplication class. Check out Configuring the SDK for information about how to configure the SDK.

Return

The configured Superwall instance.

Parameters

apiKey

Your Public API Key that you can get from the Superwall dashboard settings. If you don't have an account, you can sign up for free.

purchaseController

An object that conforms to PurchaseController. You must implement this to handle all subscription-related logic yourself. You'll need to also call setSubscriptionStatus every time the user's subscription status changes. You can read more about that in Purchases and Subscription Status.

options

An optional SuperwallOptions object which allows you to customise the appearance and behavior of the paywall.