Skip to content

Latest commit

 

History

History

README.md

Expo Superwall Example App 👋

This is an Expo project demonstrating the features of the expo-superwall SDK. It is created with create-expo-app.

Get started

  1. Install dependencies

    Use your preferred package manager:

    npm install
    # or
    yarn install
    # or
    bun install
  2. Configure API Keys

    Before running the app, you need to add your Superwall API keys.

    • Open app/index.tsx.
    • Replace "YOUR_SUPERWALL_API_KEY" with your actual iOS Superwall API key.
    • If you are testing on Android, add your Android API key as well.
    // Inside app/index.tsx
    export default function App() {
      return (
        <SuperwallProvider apiKeys={{ ios: "YOUR_SUPERWALL_API_KEY" /* android: "YOUR_ANDROID_API_KEY" */ }}>
          {/* ... app content ... */}
        </SuperwallProvider>
      );
    }
  3. Start the app

    npx expo start
    # or
    yarn expo start
    # or
    bun expo start

    In the output, you'll find options to open the app in a development build, Android emulator, or iOS simulator. Expo Go can also be used, but development builds are recommended for full native module compatibility.

Exploring the Example

This project uses file-based routing via Expo Router.

  • app/index.tsx: Initializes SuperwallProvider and shows basic loading states.
  • app/new.tsx: Demonstrates the new Hooks-based SDK (useUser, usePlacement).
  • app/compat.tsx: Demonstrates the compatibility layer SDK (legacy Superwall.shared usage).

You can start developing by editing these files or adding new routes within the app directory.

Learn more about Expo

To learn more about developing your project with Expo, look at the following resources:

Join the community

Join our community of developers creating universal apps.