Superwall
Components

SuperwallProvider

<SuperwallProvider /> is the root component for the Superwall SDK. It is used to initialize the SDK with your API key.

Props

apiKeys

The apiKeys prop is an object that contains the API keys for the Superwall SDK.

options

Optional configuration options to pass to the native Superwall SDK. See SuperwallOptions for available options.

onConfigurationError

Optional callback invoked when SDK configuration fails. Use this to track errors, show custom UI, or implement retry logic.

<SuperwallProvider
  apiKeys={{ ios: "YOUR_SUPERWALL_API_KEY" }}
  onConfigurationError={(error) => {
    console.error("Superwall configuration failed:", error);
    // Handle error, show UI, or retry
  }}
>
  {/* Your app content */}
</SuperwallProvider>

Example

import { SuperwallProvider } from "expo-superwall";

// Replace with your actual Superwall API key
export default function App() {
  return (
    <SuperwallProvider apiKeys={{ ios: "YOUR_SUPERWALL_API_KEY" /* android: API_KEY */ }}>
      {/* Your app content goes here */}
    </SuperwallProvider>
  );
}

How is this guide?

Edit on GitHub