configure()
A static method that configures the Superwall SDK with your API key.
This method is typically called once in your app's initialization, such as in your main()
function or during app startup.
Purpose
Configures the Superwall SDK with your API key and optional configuration settings.
Signature
Parameters
Name | Type | Description |
---|---|---|
apiKey | String | Your Superwall API key from the dashboard. |
purchaseController | PurchaseController? | Optional custom purchase controller. Defaults to null to use the default controller. |
options | SuperwallOptions? | Optional configuration options. Defaults to null for default settings. |
completion | Function? | Optional callback called when configuration completes. |
Returns / State
Returns a Superwall
instance that is immediately configured and ready to use.
Usage
Basic configuration:
With options:
With completion callback:
How is this guide?